Merge branch 'develop' of gitlab.eascs.com:tms-ui/tms-obc-web into develop
This commit is contained in:
40
package-lock.json
generated
40
package-lock.json
generated
@ -5172,6 +5172,14 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"css-line-break": {
|
||||
"version": "2.1.0",
|
||||
"resolved": "https://registry.npmjs.org/css-line-break/-/css-line-break-2.1.0.tgz",
|
||||
"integrity": "sha512-FHcKFCZcAha3LwfVBhCQbW2nCNbkZXn7KVUJcsT5/P8YmfsVja0FMPJr0B903j/E69HUphKiV9iQArX8SDYA4w==",
|
||||
"requires": {
|
||||
"utrie": "^1.0.2"
|
||||
}
|
||||
},
|
||||
"css-loader": {
|
||||
"version": "6.2.0",
|
||||
"resolved": "https://registry.npmmirror.com/css-loader/download/css-loader-6.2.0.tgz?cache=0&sync_timestamp=1635967924209&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2Fcss-loader%2Fdownload%2Fcss-loader-6.2.0.tgz",
|
||||
@ -8113,6 +8121,15 @@
|
||||
"integrity": "sha1-e15vfmZen7QfMAB+2eDUHpf7IUA=",
|
||||
"dev": true
|
||||
},
|
||||
"html2canvas": {
|
||||
"version": "1.4.1",
|
||||
"resolved": "https://registry.npmjs.org/html2canvas/-/html2canvas-1.4.1.tgz",
|
||||
"integrity": "sha512-fPU6BHNpsyIhr8yyMpTLLxAbkaK8ArIBcmZIRiBLiDhjeqvXolaEmDGmELFuX9I4xDcaKKcJl+TKZLqruBbmWA==",
|
||||
"requires": {
|
||||
"css-line-break": "^2.1.0",
|
||||
"text-segmentation": "^1.0.3"
|
||||
}
|
||||
},
|
||||
"htmlparser2": {
|
||||
"version": "3.10.1",
|
||||
"resolved": "https://registry.npmmirror.com/htmlparser2/download/htmlparser2-3.10.1.tgz?cache=0&sync_timestamp=1636640940074&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2Fhtmlparser2%2Fdownload%2Fhtmlparser2-3.10.1.tgz",
|
||||
@ -22662,6 +22679,14 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"text-segmentation": {
|
||||
"version": "1.0.3",
|
||||
"resolved": "https://registry.npmjs.org/text-segmentation/-/text-segmentation-1.0.3.tgz",
|
||||
"integrity": "sha512-iOiPUo/BGnZ6+54OsWxZidGCsdU8YbE4PSpdPinp7DeMtUJNJBoJ/ouUSTJjHkh1KntHaltHl/gDs2FC4i5+Nw==",
|
||||
"requires": {
|
||||
"utrie": "^1.0.2"
|
||||
}
|
||||
},
|
||||
"text-table": {
|
||||
"version": "0.2.0",
|
||||
"resolved": "https://registry.npm.taobao.org/text-table/download/text-table-0.2.0.tgz",
|
||||
@ -23211,6 +23236,21 @@
|
||||
"integrity": "sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM=",
|
||||
"dev": true
|
||||
},
|
||||
"utrie": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/utrie/-/utrie-1.0.2.tgz",
|
||||
"integrity": "sha512-1MLa5ouZiOmQzUbjbu9VmjLzn1QLXBhwpUa7kdLUQK+KQ5KA9I1vk5U4YHe/X2Ch7PYnJfWuWT+VbuxbGwljhw==",
|
||||
"requires": {
|
||||
"base64-arraybuffer": "^1.0.2"
|
||||
},
|
||||
"dependencies": {
|
||||
"base64-arraybuffer": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/base64-arraybuffer/-/base64-arraybuffer-1.0.2.tgz",
|
||||
"integrity": "sha512-I3yl4r9QB5ZRY3XuJVEPfc2XhZO6YweFPI+UovAzn+8/hb3oJ6lnysaFcjVpkCPfVWFUDvoZ8kmVDP7WyRtYtQ=="
|
||||
}
|
||||
}
|
||||
},
|
||||
"uuid": {
|
||||
"version": "3.4.0",
|
||||
"resolved": "https://registry.npmmirror.com/uuid/download/uuid-3.4.0.tgz",
|
||||
|
||||
@ -56,6 +56,7 @@
|
||||
"@swimlane/ngx-charts": "^18.0.1",
|
||||
"ajv": "^8.6.2",
|
||||
"file-saver": "^2.0.5",
|
||||
"html2canvas": "^1.4.1",
|
||||
"js-base64": "^3.6.1",
|
||||
"masonry-layout": "^4.2.2",
|
||||
"ng-gallery": "^5.0.0",
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
* @Author : Shiming
|
||||
* @Date : 2022-01-18 09:51:21
|
||||
* @LastEditors : Shiming
|
||||
* @LastEditTime : 2022-02-25 17:52:10
|
||||
* @LastEditTime : 2022-03-02 15:55:18
|
||||
* @FilePath : \\tms-obc-web\\proxy.conf.js
|
||||
* Copyright (C) 2022 huzhenhong. All rights reserved.
|
||||
*/
|
||||
|
||||
@ -34,6 +34,7 @@ export class StartupService {
|
||||
private coreSrv: CoreService
|
||||
) {
|
||||
iconSrv.addIcon(...ICONS_AUTO, ...ICONS);
|
||||
this.settingService.setLayout('fixSiderbar', true);
|
||||
}
|
||||
|
||||
// TODO: 退出登录时需要清理用户信息
|
||||
@ -95,7 +96,7 @@ export class StartupService {
|
||||
// ACL:设置权限为全量
|
||||
this.aclService.setFull(false);
|
||||
// 初始化菜单
|
||||
if(menuData){
|
||||
if (menuData) {
|
||||
this.menuService.add(menuData);
|
||||
}
|
||||
// 设置页面标题的后缀
|
||||
|
||||
@ -51,8 +51,6 @@ export class LayoutProMenuComponent implements OnInit, OnDestroy {
|
||||
}
|
||||
});
|
||||
this.menus = res;
|
||||
console.log(res);
|
||||
|
||||
this.openStatus();
|
||||
}
|
||||
|
||||
|
||||
@ -31,4 +31,12 @@
|
||||
font-size : 16px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.total-footer {
|
||||
position : absolute;
|
||||
bottom : 30px;
|
||||
height : 32px;
|
||||
margin : 16px 0;
|
||||
line-height: 32px;
|
||||
}
|
||||
@ -78,19 +78,19 @@ export class ContractManagementFrameComponent implements OnInit {
|
||||
title: '签约对象',
|
||||
width: '100px',
|
||||
className: 'text-center',
|
||||
index: 'signingObject'
|
||||
index: 'signingObjectLabel'
|
||||
},
|
||||
{
|
||||
title: '合同类型',
|
||||
width: '100px',
|
||||
className: 'text-center',
|
||||
index: 'contractType'
|
||||
index: 'contractTypeLabel'
|
||||
},
|
||||
{
|
||||
title: '合同名称',
|
||||
width: '100px',
|
||||
className: 'text-center',
|
||||
index: 'contractName'
|
||||
index: 'templateName'
|
||||
},
|
||||
{ title: '网络货运人', index: 'enterpriseInfoName', width: '120px', className: 'text-center' },
|
||||
{ title: '合同对象', index: 'contractObjectName', width: '120px', className: 'text-center' },
|
||||
|
||||
@ -1,10 +1,11 @@
|
||||
import { OnChanges } from '@angular/core';
|
||||
/*
|
||||
* @Description :
|
||||
* @Description :
|
||||
* @Version : 1.0
|
||||
* @Author : Shiming
|
||||
* @Date : 2022-01-05 11:01:55
|
||||
* @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
|
||||
* Copyright (C) 2022 huzhenhong. All rights reserved.
|
||||
*/
|
||||
@ -29,7 +30,7 @@ export class ContractManagementTemplateTextComponent implements OnInit {
|
||||
public route: ActivatedRoute,
|
||||
private datePipe: DatePipe,
|
||||
private router: Router,
|
||||
public shipperservice: ShipperBaseService,
|
||||
public shipperservice: ShipperBaseService
|
||||
) {}
|
||||
textStatus = '新建模板';
|
||||
@ViewChild('sf', { static: false }) sf!: SFComponent;
|
||||
@ -40,6 +41,7 @@ export class ContractManagementTemplateTextComponent implements OnInit {
|
||||
sfdata: any;
|
||||
sfdata2: any;
|
||||
title: any;
|
||||
Types: any;
|
||||
templateHTML: any;
|
||||
detailList: any = {
|
||||
templateName: ''
|
||||
@ -76,30 +78,57 @@ export class ContractManagementTemplateTextComponent implements OnInit {
|
||||
templateType: {
|
||||
title: '模板类型',
|
||||
type: 'string',
|
||||
default: '',
|
||||
enum: [
|
||||
{ label: '框架合同', value: 'KJ' },
|
||||
{ label: '明细合同', value: 'MX' },
|
||||
{ label: '合伙人合同', value: 'HHR' }
|
||||
],
|
||||
ui: {
|
||||
widget: 'dict-select',
|
||||
params: { dictKey: 'contract:template:type' },
|
||||
containAllLable: true,
|
||||
visibleIf: {
|
||||
_$expand: (value: boolean) => value
|
||||
widget: 'select',
|
||||
placeholder: '请选择',
|
||||
change: (tag: any, org: any) => {
|
||||
console.log(tag);
|
||||
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
|
||||
}
|
||||
},
|
||||
// contractType: {
|
||||
// title: '单据类型',
|
||||
// type: 'string',
|
||||
// default: '',
|
||||
// ui: {
|
||||
// widget: 'dict-select',
|
||||
// params: { dictKey: 'contract:document:type' },
|
||||
// containAllLable: true,
|
||||
// visibleIf: {
|
||||
// templateType: value => value === 'MX'
|
||||
// }
|
||||
// } as SFSelectWidgetSchema
|
||||
// },
|
||||
signingObject: {
|
||||
signingObject: {
|
||||
type: 'string',
|
||||
title: '承包商对象',
|
||||
enum: [
|
||||
@ -114,13 +143,11 @@ export class ContractManagementTemplateTextComponent implements OnInit {
|
||||
contractType: {
|
||||
title: '合同类型',
|
||||
type: 'string',
|
||||
default: '',
|
||||
enum: this.Types,
|
||||
ui: {
|
||||
widget: 'dict-select',
|
||||
containsAllLable: true,
|
||||
params: { dictKey: 'contract:type' },
|
||||
containAllLable: true,
|
||||
} as SFSelectWidgetSchema
|
||||
widget: 'select',
|
||||
placeholder: '请选择'
|
||||
}
|
||||
},
|
||||
resourceType: {
|
||||
title: '货源类型',
|
||||
@ -133,7 +160,7 @@ export class ContractManagementTemplateTextComponent implements OnInit {
|
||||
visibleIf: {
|
||||
templateType: value => value === 'MX'
|
||||
}
|
||||
} as SFSelectWidgetSchema,
|
||||
} as SFSelectWidgetSchema
|
||||
},
|
||||
enterpriseInfoId: {
|
||||
type: 'string',
|
||||
@ -147,7 +174,7 @@ export class ContractManagementTemplateTextComponent implements OnInit {
|
||||
},
|
||||
asyncData: () => this.shipperservice.getNetworkFreightForwarder()
|
||||
}
|
||||
},
|
||||
}
|
||||
},
|
||||
required: ['templateName', 'templateType']
|
||||
};
|
||||
@ -178,11 +205,11 @@ export class ContractManagementTemplateTextComponent implements OnInit {
|
||||
}
|
||||
initData(url: string) {
|
||||
console.log('编辑');
|
||||
|
||||
|
||||
this.service.request(url, { id: this.route.snapshot.params.id }).subscribe(res => {
|
||||
if (res) {
|
||||
this.detailList = res;
|
||||
this.title = this.detailList?.templateName
|
||||
this.title = this.detailList?.templateName;
|
||||
this.sfdata = res;
|
||||
this.sfdata2 = res;
|
||||
}
|
||||
@ -208,7 +235,7 @@ export class ContractManagementTemplateTextComponent implements OnInit {
|
||||
...this.sf2.value,
|
||||
templateTitle: this.title || this.detailList.templateName
|
||||
};
|
||||
console.log(params)
|
||||
console.log(params);
|
||||
this.service.request(this.service.$api_save_contractTemplate, params).subscribe((res: any) => {
|
||||
if (res) {
|
||||
this.service.msgSrv.success('保存成功!');
|
||||
|
||||
@ -131,19 +131,19 @@ export class ContractManagementTemplateFrameComponent implements OnInit {
|
||||
title: '签约对象',
|
||||
width: '100px',
|
||||
className: 'text-center',
|
||||
render: 'signingObject'
|
||||
render: 'signingObjectLabel'
|
||||
},
|
||||
{
|
||||
title: '合同类型',
|
||||
width: '100px',
|
||||
className: 'text-center',
|
||||
index: 'contractType'
|
||||
index: 'contractTypeLabel'
|
||||
},
|
||||
{
|
||||
title: '货源类型',
|
||||
width: '100px',
|
||||
className: 'text-center',
|
||||
index: 'resourceType'
|
||||
index: 'resourceTypeLabel'
|
||||
},
|
||||
{ title: '创建人', index: 'createUserId', width: '120px', className: 'text-center' },
|
||||
{
|
||||
|
||||
@ -131,19 +131,19 @@ export class ContractManagementTemplatePartnerComponent implements OnInit {
|
||||
title: '签约对象',
|
||||
width: '100px',
|
||||
className: 'text-center',
|
||||
index: 'signingObject'
|
||||
index: 'signingObjectLabel'
|
||||
},
|
||||
{
|
||||
title: '合同类型',
|
||||
width: '100px',
|
||||
className: 'text-center',
|
||||
index: 'contractType'
|
||||
index: 'contractTypeLabel'
|
||||
},
|
||||
{
|
||||
title: '货源类型',
|
||||
width: '100px',
|
||||
className: 'text-center',
|
||||
index: 'resourceType'
|
||||
index: 'resourceTypeLabel'
|
||||
},
|
||||
{ title: '创建人', index: 'createUserId', width: '120px', className: 'text-center' },
|
||||
{
|
||||
|
||||
@ -131,19 +131,19 @@ export class ContractManagementTemplateDetailComponent implements OnInit {
|
||||
title: '签约对象',
|
||||
width: '100px',
|
||||
className: 'text-center',
|
||||
index: 'signingObject'
|
||||
index: 'signingObjectLabel'
|
||||
},
|
||||
{
|
||||
title: '合同类型',
|
||||
width: '100px',
|
||||
className: 'text-center',
|
||||
index: 'contractType'
|
||||
index: 'contractTypeLabel'
|
||||
},
|
||||
{
|
||||
title: '货源类型',
|
||||
width: '100px',
|
||||
className: 'text-center',
|
||||
index: 'resourceType'
|
||||
index: 'resourceTypeLabel'
|
||||
},
|
||||
{ title: '创建人', index: 'createUserId', width: '120px', className: 'text-center' },
|
||||
{
|
||||
|
||||
@ -49,7 +49,7 @@ export class AdvanceCollectionComponent implements OnInit {
|
||||
}
|
||||
|
||||
exportList() {
|
||||
this.service.downloadFile(this.service.$mock_url, { ...this.sf.value, pageIndex: this.st.pi, pageSize: this.st.ps });
|
||||
this.service.downloadFile(this.service.$mock_url, { ...this.sf.value, pageSize: -1 });
|
||||
}
|
||||
|
||||
private initSF(): SFSchema {
|
||||
|
||||
@ -30,13 +30,13 @@
|
||||
{{ costInfo?.armoeny | currency }}
|
||||
</se>
|
||||
<se label="开票金额" required>
|
||||
{{ costInfo?.arkpmoney | currency }}
|
||||
{{ costInfo?.armoeny | currency }}
|
||||
</se>
|
||||
<se label="收款金额" required>
|
||||
{{ costInfo?.armoeny | currency }}
|
||||
</se>
|
||||
</se-container>
|
||||
<se-container col="3" labelWidth="100" *ngIf="textStatus" class="mt-md">
|
||||
<se-container col="3" labelWidth="120" *ngIf="textStatus" class="mt-md">
|
||||
<se-title class="mb-md" style="font-size: 18px">基本信息(应付费用)</se-title>
|
||||
<se label="网络货运人" required>
|
||||
{{ costInfo?.ltdName }}
|
||||
@ -44,7 +44,7 @@
|
||||
<se label="费用类型" required>
|
||||
{{ costInfo?.feetypeLabel }}
|
||||
</se>
|
||||
<se label="应付核销" required> {{ costInfo?.hrmoney}}</se>
|
||||
<se label="应付核销" required> {{ costInfo?.hrmoney | currency}}</se>
|
||||
<se label="费用备注">
|
||||
{{ costInfo?.hrremarks }}
|
||||
</se>
|
||||
@ -103,8 +103,8 @@
|
||||
<nz-tab nzTitle="开票信息">
|
||||
<st #st [scroll]="{ x: '2000px' }" [data]="costInfo?.ficoVatappDatailList" [columns]="columns.requested"
|
||||
[page]="{ show: false }" [loading]="service.http.loading" [scroll]="{ x: '1200px', y: '370px' }">
|
||||
<ng-template st-row="vatnotax" let-item let-index="index">
|
||||
{{ item.vatnotax | currency}}
|
||||
<ng-template st-row="armoney" let-item let-index="index">
|
||||
{{ item.armoney | currency}}
|
||||
</ng-template>
|
||||
<ng-template st-row="vatmoney" let-item let-index="index">
|
||||
{{ item.vatmoney | currency}}
|
||||
@ -114,7 +114,7 @@
|
||||
</ng-template>
|
||||
</st>
|
||||
</nz-tab>
|
||||
<nz-tab nzTitle="收款信息">
|
||||
<nz-tab nzTitle="收款信息" *ngIf="!textStatus">
|
||||
<st #st [scroll]="{ x: '2000px' }" [data]="costInfo?.ficoAhxLList" [columns]="columns.collection"
|
||||
[page]="{ show: false }" [loading]="service.http.loading" [scroll]="{ x: '1200px', y: '370px' }">
|
||||
<ng-template st-row="ahxmoney" let-item let-index="index">
|
||||
@ -139,6 +139,9 @@
|
||||
<ng-template st-row="no" let-item let-index="index" let-column="column">
|
||||
{{ index + 1 }}
|
||||
</ng-template>
|
||||
<ng-template st-row="phxmoney" let-item let-index="index" let-column="column">
|
||||
{{ item.phxmoney | currency}}
|
||||
</ng-template>
|
||||
</st>
|
||||
</nz-tab>
|
||||
</nz-tabset>
|
||||
|
||||
@ -54,10 +54,10 @@ export class CostManagementDetailComponent implements OnInit {
|
||||
{ title: '费用科目', index: 'feeSubName', className: 'text-left', width: 200 },
|
||||
{
|
||||
title: '税率',
|
||||
index: 'hrvatrate',
|
||||
index: 'arvatrate',
|
||||
className: 'text-right',
|
||||
width: 200,
|
||||
format: item => `${item.hrvatrate ? ((item.hrvatrate as number) * 100).toFixed(2) : 0}%`
|
||||
format: item => `${item.arvatrate ? ((item.arvatrate as number) * 100).toFixed(2) : 0}%`
|
||||
},
|
||||
{ title: '费用金额', render: 'hrvatmoney', className: 'text-right', width: 200 },
|
||||
{ title: '收/付款金额', render: 'armoney', className: 'text-right', width: 200 },
|
||||
@ -67,9 +67,9 @@ export class CostManagementDetailComponent implements OnInit {
|
||||
{ title: '序号', render: 'no', width: 70, className: 'text-left' },
|
||||
{ title: '费用明细号', index: 'feeLId', className: 'text-left', width: 200 },
|
||||
{ title: '发票申请', index: 'vatinvcode', className: 'text-left', width: 200 },
|
||||
{ title: '发票类型', index: 'vatapptype', className: 'text-left', width: 200 },
|
||||
{ title: '发票号', index: 'vatappcode', className: 'text-left', width: 200 },
|
||||
{ title: '发票日期', index: 'vatappdate', className: 'text-left', width: 200 },
|
||||
{ title: '发票类型', index: 'invoicetypeLabel', className: 'text-left', width: 200 },
|
||||
{ title: '发票号', index: 'invoiceno', className: 'text-left', width: 200 },
|
||||
{ title: '发票日期', index: 'invoicedate', className: 'text-left', width: 200 },
|
||||
{ title: '发票状态', index: 'stsLabel', className: 'text-left', width: 200 },
|
||||
{ title: '应收金额', render: 'armoney', className: 'text-left', width: 200 },
|
||||
{ title: '开票金额', render: 'vatmoney', className: 'text-left', width: 200 }
|
||||
@ -100,9 +100,9 @@ export class CostManagementDetailComponent implements OnInit {
|
||||
{ title: '付款单号', index: 'phxHId' },
|
||||
{ title: '要求日期', index: 'billTime' },
|
||||
{ title: '确认日期', index: 'feedate' },
|
||||
{ title: '付款状态', index: 'callNo' },
|
||||
{ title: '应付金额', index: 'callNo' },
|
||||
{ title: '付款金额', index: 'phxmoney' }
|
||||
// { title: '付款状态', index: 'callNo' },
|
||||
{ title: '应付金额', render: 'phxmoney' },
|
||||
{ title: '付款金额', render: 'phxmoney' }
|
||||
]
|
||||
};
|
||||
}
|
||||
|
||||
@ -90,7 +90,7 @@ export class CostManagementComponent implements OnInit {
|
||||
}
|
||||
|
||||
exportList() {
|
||||
this.service.downloadFile(this.service.$mock_url, { ...this.sf.value, pageIndex: this.st.pi, pageSize: this.st.ps });
|
||||
this.service.downloadFile(this.service.$mock_url, { ...this.sf.value, pageSize: -1 });
|
||||
}
|
||||
|
||||
routeTo(url: string, params?: any, status?: any) {
|
||||
@ -188,9 +188,10 @@ export class CostManagementComponent implements OnInit {
|
||||
searchLoadingText: '搜索中...',
|
||||
allowClear: true,
|
||||
onSearch: (q: any) => {
|
||||
if (!!q) {
|
||||
let str = q.replace(/^\s+|\s+$/g, '');
|
||||
if (str) {
|
||||
return this.service
|
||||
.request(this.service.$api_enterpriceList, { enterpriseName: q })
|
||||
.request(this.service.$api_enterpriceList, { enterpriseName: str })
|
||||
.pipe(map((res: any) => (res as any[]).map(i => ({ label: i.enterpriseName, value: i.id } as SFSchemaEnum))))
|
||||
.toPromise();
|
||||
} else {
|
||||
@ -212,9 +213,10 @@ export class CostManagementComponent implements OnInit {
|
||||
searchLoadingText: '搜索中...',
|
||||
allowClear: true,
|
||||
onSearch: (q: any) => {
|
||||
if (!!q) {
|
||||
let str = q.replace(/^\s+|\s+$/g, '');
|
||||
if (str) {
|
||||
return this.service
|
||||
.request(this.service.$api_enterpriceList, { enterpriseName: q })
|
||||
.request(this.service.$api_enterpriceList, { enterpriseName: str })
|
||||
.pipe(map((res: any) => (res as any[]).map(i => ({ label: i.enterpriseName, value: i.id } as SFSchemaEnum))))
|
||||
.toPromise();
|
||||
} else {
|
||||
@ -300,13 +302,13 @@ export class CostManagementComponent implements OnInit {
|
||||
{
|
||||
text: '浏览',
|
||||
click: item => this.routeTo('/financial-management/cost-management/detail/' + item.id, { status: item?.feetypeLabel }),
|
||||
acl: { ability: ['FINANCIAL-COST-view'] },
|
||||
acl: { ability: ['FINANCIAL-COST-view'] }
|
||||
},
|
||||
{
|
||||
text: '审核',
|
||||
click: item => this.auditAction(item),
|
||||
iif: item => item.sts === 2,
|
||||
acl: { ability: ['FINANCIAL-COST-audit'] },
|
||||
acl: { ability: ['FINANCIAL-COST-audit'] }
|
||||
}
|
||||
// {
|
||||
// text: '修改',
|
||||
|
||||
@ -15,17 +15,17 @@
|
||||
</nz-statistic>
|
||||
</nz-col>
|
||||
<nz-col [nzXl]="5" [nzLg]="8" [nzSm]="12">
|
||||
<nz-statistic [nzValue]="(params?.availableBalance || 0)+'元' " [nzTitle]="'账户余额'"
|
||||
<nz-statistic [nzValue]="((params?.availableBalance || 0) | currency)+'元' " [nzTitle]="'账户余额'"
|
||||
[nzValueStyle]="{'font-size':'16px',color:'red'}">
|
||||
</nz-statistic>
|
||||
</nz-col>
|
||||
<nz-col [nzXl]="5" [nzLg]="8" [nzSm]="12">
|
||||
<nz-statistic [nzValue]="(info?.incomeAmount || 0) +'元'" [nzTitle]="'收入金额'"
|
||||
<nz-statistic [nzValue]="((info?.incomeAmount || 0) | currency) +'元'" [nzTitle]="'收入金额'"
|
||||
[nzValueStyle]="{'font-size':'16px',color:'red'}">
|
||||
</nz-statistic>
|
||||
</nz-col>
|
||||
<nz-col [nzXl]="5" [nzLg]="8" [nzSm]="12">
|
||||
<nz-statistic [nzValue]="(info?.payAmount || 0) +'元'" [nzTitle]="'支出金额'"
|
||||
<nz-statistic [nzValue]="((info?.payAmount || 0)| currency) +'元'" [nzTitle]="'支出金额'"
|
||||
[nzValueStyle]="{'font-size':'16px',color:'red'}">
|
||||
</nz-statistic>
|
||||
</nz-col>
|
||||
|
||||
@ -74,7 +74,7 @@ export class DriverAccountDetailComponent implements OnInit {
|
||||
stChange(e: STChange): void {}
|
||||
|
||||
exportList() {
|
||||
this.service.downloadFile(this.service.$mock_url, { ...this.sf.value, pageIndex: this.st.pi, pageSize: this.st.ps });
|
||||
this.service.downloadFile(this.service.$mock_url, { ...this.sf.value, pageSize: -1 });
|
||||
}
|
||||
|
||||
goBack() {
|
||||
|
||||
@ -74,7 +74,7 @@ export class DriverAccountComponent implements OnInit {
|
||||
}
|
||||
|
||||
exportList() {
|
||||
this.service.downloadFile(this.service.$mock_url, { ...this.sf.value, pageIndex: this.st.pi, pageSize: this.st.ps });
|
||||
this.service.downloadFile(this.service.$mock_url, { ...this.sf.value, pageSize: -1 });
|
||||
}
|
||||
|
||||
private initSF(): SFSchema {
|
||||
|
||||
@ -31,7 +31,7 @@
|
||||
</nz-row>
|
||||
</nz-card>
|
||||
|
||||
<nz-card nzBordered>
|
||||
<nz-card nzBordered>
|
||||
<div nz-row nzGutter="8">
|
||||
<div nz-col [nzXl]="_$expand ? 24 : 18" [nzLg]="24" [nzSm]="24" [nzXs]="24">
|
||||
<sf #sf [schema]="searchSchema"
|
||||
@ -57,4 +57,9 @@
|
||||
[res]="{ reName: { list: 'data.records', total: 'data.total' } }"
|
||||
[page]="{ show: true, showSize: true, pageSizes: [10, 20, 30, 50, 100, 200, 300, 500, 1000] }"
|
||||
[loading]="service.http.loading" [scroll]="{ x:'1200px',y: '300px' }" (change)="stChange($event)"></st>
|
||||
<div class="total-footer text-md" *ngIf="st?.list?.length !== 0 ">
|
||||
合计 <label class="text-red-dark">{{ static?.total }}</label> 项,收入
|
||||
<label class="text-red-dark font-weight-bold">{{ static?.incomeAmount | currency }}</label>,支出
|
||||
<label class="text-red-dark font-weight-bold">{{static?.payAmount | currency }}</label>
|
||||
</div>
|
||||
</nz-card>
|
||||
@ -20,7 +20,7 @@ export class FreightAccountDetailComponent implements OnInit {
|
||||
|
||||
info: any = {};
|
||||
params: any = {};
|
||||
|
||||
static: any = {};
|
||||
_$expand = false;
|
||||
constructor(public service: FreightAccountService, private nzModalService: NzModalService, private route: ActivatedRoute) {
|
||||
this.params = route.snapshot.queryParams;
|
||||
@ -46,6 +46,7 @@ export class FreightAccountDetailComponent implements OnInit {
|
||||
}
|
||||
});
|
||||
}
|
||||
this.loadStatistics(requestOptions.body);
|
||||
return requestOptions;
|
||||
};
|
||||
|
||||
@ -71,10 +72,18 @@ export class FreightAccountDetailComponent implements OnInit {
|
||||
});
|
||||
}
|
||||
|
||||
loadStatistics(params: any) {
|
||||
this.service.request(this.service.$api_get_shipper_account_balance_detail, params).subscribe(res => {
|
||||
if (res) {
|
||||
this.static = res;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
stChange(e: STChange): void {}
|
||||
|
||||
exportList() {
|
||||
this.service.downloadFile(this.service.$mock_url, { ...this.sf.value, pageIndex: this.st.pi, pageSize: this.st.ps });
|
||||
this.service.downloadFile(this.service.$mock_url, { ...this.sf.value, pageSize: -1 });
|
||||
}
|
||||
|
||||
goBack() {
|
||||
@ -186,12 +195,15 @@ export class FreightAccountDetailComponent implements OnInit {
|
||||
|
||||
private initST(): STColumn[] {
|
||||
return [
|
||||
{ title: '交易时间', index: 'createTime', type: 'date' },
|
||||
{ title: '流水号', index: 'transactionNumber' },
|
||||
{ title: '交易类型', index: 'tradeTypeLabel', className: 'text-center' },
|
||||
{ title: '关联单号', index: 'businessNumber' },
|
||||
{ title: '所属项目', index: 'projectId' },
|
||||
{ title: '收支类型', index: 'incomeTypeLabel', className: 'text-center' },
|
||||
{ title: '交易时间', index: 'createTime', type: 'date', width: 170 },
|
||||
{ title: '流水号', index: 'transactionNumber', width: 170 },
|
||||
{ title: '交易类型', index: 'tradeTypeLabel', className: 'text-center', width: 140 },
|
||||
{ title: '交易单号', index: 'businessNumber', width: 170 },
|
||||
{ title: '订单号', index: 'orderSn', width: 170 },
|
||||
{ title: '运单号', index: 'transportSn', width: 170 },
|
||||
{ title: '货主', index: 'enterpriseName' , width: 170},
|
||||
{ title: '所属项目', index: 'projectName' , width: 170},
|
||||
{ title: '收支类型', index: 'incomeTypeLabel', className: 'text-center', width: 140 },
|
||||
{
|
||||
title: '交易金额',
|
||||
index: 'amount',
|
||||
@ -207,7 +219,10 @@ export class FreightAccountDetailComponent implements OnInit {
|
||||
type: 'widget',
|
||||
className: 'text-right',
|
||||
widget: { type: 'currency-chy', params: ({ record }) => ({ value: record.accountBalance }) }
|
||||
}
|
||||
},
|
||||
{ title: '付款方', index: 'payName' , width: 170},
|
||||
{ title: '收款方', index: 'payeeName', width: 170 },
|
||||
{ title: '备注', index: 'tradeContent', width: 170 }
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
@ -80,7 +80,7 @@ export class FreightAccountComponent implements OnInit {
|
||||
}
|
||||
|
||||
exportList() {
|
||||
this.service.downloadFile(this.service.$mock_url, { ...this.sf.value, pageIndex: this.st.pi, pageSize: this.st.ps });
|
||||
this.service.downloadFile(this.service.$mock_url, { ...this.sf.value, pageSize: -1 });
|
||||
}
|
||||
|
||||
private initSF(): SFSchema {
|
||||
@ -167,11 +167,11 @@ export class FreightAccountComponent implements OnInit {
|
||||
|
||||
private initST(): STColumn[] {
|
||||
return [
|
||||
{ title: '企业名称', width: 140, index: 'tenantName' },
|
||||
{ title: '企业名称', width: 170, index: 'tenantName' },
|
||||
{ title: '联系人', width: 120, index: 'name' },
|
||||
{ title: '联系人电话', width: 140, index: 'phone' },
|
||||
{ title: '网络货运人', width: 140, index: 'ltdName' },
|
||||
{ title: '银行类型',width: 120, index: 'bankTypeLabel' },
|
||||
{ title: '网络货运人', width: 170, index: 'ltdName' },
|
||||
{ title: '银行类型', width: 120, index: 'bankTypeLabel' },
|
||||
{ title: '虚拟账户', width: 140, index: 'virtualAccount' },
|
||||
{
|
||||
title: '可用余额',
|
||||
@ -199,7 +199,7 @@ export class FreightAccountComponent implements OnInit {
|
||||
{
|
||||
title: '状态',
|
||||
index: 'stateDeletedLabel',
|
||||
width: 80,
|
||||
width: 80
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
|
||||
@ -29,7 +29,7 @@
|
||||
{{headerInfo?.ltdAccountId}}
|
||||
</se>
|
||||
<se label="应付已核销" required>
|
||||
{{headerInfo?.payMoney}}
|
||||
{{headerInfo?.payMoney | currency}}
|
||||
</se>
|
||||
</div>
|
||||
<div nz-col [nzXl]="8" [nzLg]="8" [nzSm]="8" [nzXs]="8" se-container [labelWidth]="150" col="1">
|
||||
@ -37,7 +37,7 @@
|
||||
{{headerInfo?.payDate}}
|
||||
</se>
|
||||
<se label="收款账户" required>
|
||||
{{headerInfo?.ltdaccountId}}
|
||||
{{headerInfo?.hrBankName}} - {{headerInfo?.hrBankNo}}
|
||||
</se>
|
||||
<se label="确认日期" required>
|
||||
{{headerInfo?.payDate}}
|
||||
@ -51,7 +51,7 @@
|
||||
{{headerInfo?.payModeLabel}}
|
||||
</se>
|
||||
<se label="付款类型" required>
|
||||
{{headerInfo?.payType}}
|
||||
{{headerInfo?.payTypeLabel}}
|
||||
</se>
|
||||
<se label="付款金额" required>
|
||||
{{headerInfo?.payMoney |currency}}
|
||||
|
||||
@ -36,9 +36,9 @@
|
||||
{{ item.orderPaymentCode }} <br> <a>{{ item.paymentStatusLabel }}</a>
|
||||
</ng-template>
|
||||
<ng-template st-row="amountDetails" let-item let-index="index" let-column="column">
|
||||
预付:¥{{ item.price }}<br />
|
||||
预付:{{ item.price | currency }}<br />
|
||||
<ng-container *ngIf="item.payType==='1'">
|
||||
附加费:¥ {{ item.surcharge }}
|
||||
附加费: {{ item.surcharge| currency }}
|
||||
</ng-container>
|
||||
</ng-template>
|
||||
<ng-template st-row="billCode" let-item let-index="index" let-column="column">
|
||||
|
||||
@ -242,7 +242,7 @@ export class PaymentRecordComponent implements OnInit {
|
||||
{
|
||||
title: '支付金额',
|
||||
render: 'payAmount',
|
||||
width: 120,
|
||||
width: 140,
|
||||
type: 'widget',
|
||||
className: 'text-right',
|
||||
widget: { type: 'currency-chy', params: ({ record }) => ({ value: record.payAmount }) }
|
||||
@ -256,7 +256,7 @@ export class PaymentRecordComponent implements OnInit {
|
||||
(item.amountDetails as Array<any>).forEach(detail => {
|
||||
surcharge += detail.surcharge || 0;
|
||||
});
|
||||
item.surcharge = surcharge;
|
||||
item.surcharge = surcharge.toFixed(2);
|
||||
item.price = item.amountDetails?.[0]?.price || 0;
|
||||
return '';
|
||||
}
|
||||
|
||||
@ -65,7 +65,7 @@ export class PlatformAccountDetailComponent implements OnInit {
|
||||
stChange(e: STChange): void {}
|
||||
|
||||
exportList() {
|
||||
this.service.downloadFile(this.service.$mock_url, { ...this.sf.value, pageIndex: this.st.pi, pageSize: this.st.ps });
|
||||
this.service.downloadFile(this.service.$mock_url, { ...this.sf.value, pageSize: -1 });
|
||||
}
|
||||
|
||||
goBack() {
|
||||
|
||||
@ -52,7 +52,13 @@
|
||||
</nz-card>
|
||||
|
||||
<nz-card class="content-box">
|
||||
<st #st [data]="service.$api_get_platform_account_page" [columns]="columns" [req]="{ process: beforeReq }" [page]="{}"
|
||||
[scroll]="{ x: '1200px' }" [loading]="service.http.loading">
|
||||
<st #st [data]="service.$api_get_platform_account_page" [columns]="columns" [req]="{ process: beforeReq }"
|
||||
[page]="{}" [scroll]="{ x: '1200px' }" [loading]="service.http.loading">
|
||||
</st>
|
||||
<div class="total-footer text-md" *ngIf="st?.list?.length !== 0 ">
|
||||
合计 <label class="text-red-dark">{{ static?.total }}</label> 项,收入
|
||||
<label class="text-red-dark font-weight-bold">{{ static?.incomeAmount | currency }}</label>,支出
|
||||
<label class="text-red-dark font-weight-bold">{{static?.payAmount | currency }}</label>
|
||||
</div>
|
||||
|
||||
</nz-card>
|
||||
@ -19,6 +19,8 @@ export class PlatformAccountComponent implements OnInit {
|
||||
columns: STColumn[] = this.initST();
|
||||
|
||||
info: any = {};
|
||||
|
||||
static: any = {};
|
||||
constructor(public service: FreightAccountService, private router: Router, private nzModalService: NzModalService) {}
|
||||
|
||||
ngOnInit(): void {
|
||||
@ -29,6 +31,7 @@ export class PlatformAccountComponent implements OnInit {
|
||||
if (this.sf) {
|
||||
Object.assign(requestOptions.body, { ...this.sf.value });
|
||||
}
|
||||
this.loadStatistics(requestOptions.body);
|
||||
return requestOptions;
|
||||
};
|
||||
|
||||
@ -44,6 +47,14 @@ export class PlatformAccountComponent implements OnInit {
|
||||
});
|
||||
}
|
||||
|
||||
loadStatistics(params: any) {
|
||||
this.service.request(this.service.$api_get_platform_account_statistics, params).subscribe(res => {
|
||||
if (res) {
|
||||
this.static = res;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 重置表单
|
||||
*/
|
||||
|
||||
@ -42,16 +42,16 @@ export class ReceivableOrderDetailComponent implements OnInit {
|
||||
}
|
||||
|
||||
beforeReq = (requestOptions: STRequestOptions) => {
|
||||
Object.assign(requestOptions.body, { billHId: this.billHId });
|
||||
Object.assign(requestOptions.body, { ahxHId: this.id });
|
||||
if (this.sf) {
|
||||
Object.assign(requestOptions.body, {
|
||||
...this.sf.value,
|
||||
...this.sf.value
|
||||
});
|
||||
if (this.sf.value.feedate?.[0]) {
|
||||
Object.assign(requestOptions.body, {
|
||||
feedate: {
|
||||
start: this.sf.value.feedate?.[0] || '',
|
||||
end: this.sf.value.feedate?.[1] || ''
|
||||
start: this.sf.value.feedate?.[0] || '',
|
||||
end: this.sf.value.feedate?.[1] || ''
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -108,7 +108,7 @@ export class ReceivableOrderDetailComponent implements OnInit {
|
||||
widget: 'select',
|
||||
placeholder: '请选择',
|
||||
allowClear: true,
|
||||
asyncData: () => this.service.getCloseAccount(),
|
||||
asyncData: () => this.service.getCloseAccount()
|
||||
},
|
||||
default: ''
|
||||
},
|
||||
@ -122,7 +122,7 @@ export class ReceivableOrderDetailComponent implements OnInit {
|
||||
expand: (value: boolean) => value
|
||||
}
|
||||
} as SFDateWidgetSchema
|
||||
},
|
||||
}
|
||||
// billTime: {
|
||||
// title: '订单日期',
|
||||
// type: 'string',
|
||||
@ -146,8 +146,8 @@ export class ReceivableOrderDetailComponent implements OnInit {
|
||||
{ title: '订单号', index: 'billHCode', width: 100 },
|
||||
// { title: '订单日期', index: 'billTime', width: 150 },
|
||||
// { title: '费用类型', index: 'cnoName', width: 90 },
|
||||
// { title: '订单费用科目', index: 'feeSubId', width: 100 },
|
||||
{ title: '费用科目', index: 'feeSubId', width: 140 },
|
||||
{ title: '订单费用科目', index: 'billLTypeLabel', width: 100 },
|
||||
{ title: '费用科目', index: 'feeSubName', width: 140 },
|
||||
{ title: '结算客户', index: 'cnoName', width: 100 },
|
||||
{
|
||||
title: '已收金额',
|
||||
|
||||
@ -49,7 +49,7 @@ export class RechargeRecordComponent implements OnInit {
|
||||
}
|
||||
|
||||
exportList() {
|
||||
this.service.downloadFile(this.service.$mock_url, { ...this.sf.value, pageIndex: this.st.pi, pageSize: this.st.ps });
|
||||
this.service.downloadFile(this.service.$mock_url, { ...this.sf.value, pageSize: -1 });
|
||||
}
|
||||
|
||||
private initSF(): SFSchema {
|
||||
@ -162,9 +162,16 @@ export class RechargeRecordComponent implements OnInit {
|
||||
{ title: '网络货运人', index: 'ltdName', width: 160 },
|
||||
{ title: '银行类型', index: 'bankTypeLabel', width: 100 },
|
||||
{ title: '账户类型', index: 'accountTypeLabel', width: 100 },
|
||||
{ title: '账户名称', index: 'rechargeName', width: 140 },
|
||||
{ title: '账户名称', index: 'rechargeName', width: 160 },
|
||||
{ title: '虚拟账户', index: 'virtualAccount', width: 100 },
|
||||
{ title: '充值金额', index: 'rechargeAmount', width: 100 },
|
||||
{
|
||||
title: '充值金额',
|
||||
index: 'rechargeAmount',
|
||||
width: 160,
|
||||
type: 'widget',
|
||||
className: 'text-right',
|
||||
widget: { type: 'currency-chy', params: ({ record }) => ({ value: record.rechargeAmount }) }
|
||||
},
|
||||
{ title: '充值银行账户', render: 'transferBankAccount', width: 200 },
|
||||
{ title: '充值方式', index: 'payChannelLabel', width: 100 },
|
||||
{ title: '充值状态', index: 'rechargeStatusLabel', width: 100 },
|
||||
|
||||
@ -25,8 +25,8 @@
|
||||
<nz-tabset>
|
||||
<nz-tab nzTitle="全部" (nzClick)="changeRefundStatus()"></nz-tab>
|
||||
<nz-tab nzTitle="待审核" (nzClick)="changeRefundStatus('1')"></nz-tab>
|
||||
<nz-tab nzTitle="退款中" (nzClick)="changeRefundStatus('2')"></nz-tab>
|
||||
<nz-tab nzTitle="退款成功" (nzClick)="changeRefundStatus('3')"></nz-tab>
|
||||
<nz-tab nzTitle="退款中" (nzClick)="changeRefundStatus('4')"></nz-tab>
|
||||
<nz-tab nzTitle="退款成功" (nzClick)="changeRefundStatus('2')"></nz-tab>
|
||||
<nz-tab nzTitle="退款失败" (nzClick)="changeRefundStatus('5')"></nz-tab>
|
||||
</nz-tabset>
|
||||
|
||||
|
||||
@ -24,18 +24,20 @@ export class RefundRecordComponent implements OnInit {
|
||||
refundStatus: any = '';
|
||||
|
||||
msg = '';
|
||||
|
||||
constructor(public service: FreightAccountService, private nzModalService: NzModalService, private router: Router) {}
|
||||
|
||||
ngOnInit(): void {}
|
||||
ngOnInit(): void {
|
||||
}
|
||||
|
||||
beforeReq = (requestOptions: STRequestOptions) => {
|
||||
Object.assign(requestOptions.body, { refundStatus: this.refundStatus || null });
|
||||
if (this.sf) {
|
||||
Object.assign(requestOptions.body, {
|
||||
...this.sf.value,
|
||||
createTime: {
|
||||
start: this.sf.value.createTime?.[0] || '',
|
||||
end: this.sf.value.createTime?.[1] || ''
|
||||
refundExecuteTime: {
|
||||
start: this.sf.value.refundExecuteTime?.[0] || '',
|
||||
end: this.sf.value.refundExecuteTime?.[1] || ''
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -58,7 +60,7 @@ export class RefundRecordComponent implements OnInit {
|
||||
type: 'default',
|
||||
onClick: () => {
|
||||
if (!this.msg) {
|
||||
this.service.msgSrv.warning('请填写原因')
|
||||
this.service.msgSrv.warning('请填写原因');
|
||||
return false;
|
||||
}
|
||||
this.service
|
||||
@ -250,10 +252,10 @@ export class RefundRecordComponent implements OnInit {
|
||||
private initST(): STColumn[] {
|
||||
return [
|
||||
{ title: '退款单号', render: 'orderRefundCode', width: 190 },
|
||||
{ title: '退款类型', index: 'refundTypeLabel', width: 130 },
|
||||
{ title: '退款金额', render: 'refundAmount', className: 'text-right', width: 160 },
|
||||
{ title: '退款时间', index: 'applyTime', width: 170 },
|
||||
{ title: '货主', index: 'shipperId', width: 150 },
|
||||
{ title: '退款类型', index: 'refundTypeLabel', width: 140 },
|
||||
{ title: '退款金额', render: 'refundAmount', className: 'text-right', width: 180 },
|
||||
{ title: '退款时间', index: 'refundExecuteTime', width: 170 },
|
||||
{ title: '企业名称', index: 'enterpriseInfoName', width: 150 },
|
||||
{ title: '所属项目', index: 'enterpriseProjectName', width: 140 },
|
||||
{ title: '支付单', render: 'billRefundPaymentVOS', width: 150 },
|
||||
{ title: '订单号', index: 'billCode', width: 150 },
|
||||
|
||||
@ -22,7 +22,7 @@
|
||||
<!-- <button nz-button nzType="primary" [nzLoading]="service.http.loading" style="float: right;">打印</button> -->
|
||||
</se-title>
|
||||
<se label="帐套" required>
|
||||
{{info?.ltdId}}
|
||||
{{info?.vcltdcode}} - {{info?.vcltdname}}
|
||||
</se>
|
||||
<se label="凭证类型" required>
|
||||
{{info?.vctype}}
|
||||
|
||||
@ -13,9 +13,7 @@ import { Component, OnInit, ViewChild } from '@angular/core';
|
||||
import { Router } from '@angular/router';
|
||||
import { STComponent, STColumn, STRequestOptions, STChange } from '@delon/abc/st';
|
||||
import { SFComponent, SFSchema, SFDateWidgetSchema } from '@delon/form';
|
||||
import { ShipperBaseService } from '@shared';
|
||||
import { NzModalService } from 'ng-zorro-antd/modal';
|
||||
import { AddCollectionInvoiceModalComponent } from 'src/app/routes/ticket-management/components/input-invoice/add-collection-invoice-modal/add-collection-invoice-modal.component';
|
||||
import { FreightAccountService } from '../../services/freight-account.service';
|
||||
|
||||
@Component({
|
||||
@ -294,7 +292,7 @@ export class VoucherManagementComponent implements OnInit {
|
||||
return [
|
||||
{ title: '', index: 'key', type: 'checkbox', width: 60, className: 'text-center', fixed: 'left' },
|
||||
{ title: '凭证号', index: 'vccode', type: 'link', width: 200 },
|
||||
{ title: '帐套', index: 'ltdId', width: 200 },
|
||||
{ title: '帐套', index: 'ltdId', width: 200,format:item=>`${item.vcltdcode}-${item.vcltdname}` },
|
||||
{ title: '凭证时间', index: 'vctime', type: 'date', width: 200 },
|
||||
{ title: '凭证类型', index: 'vctype', width: 200 },
|
||||
{ title: '序号', index: 'invmoney', width: 200, format: _ => '1' },
|
||||
|
||||
@ -47,7 +47,7 @@
|
||||
{{formData?.bankSerialNumber}}
|
||||
</se>
|
||||
<se label="提现至银行卡">
|
||||
{{formData?.bankId}}
|
||||
{{formData?.bankCardNumber}}
|
||||
</se>
|
||||
<se label="银行回单" col="1">
|
||||
<a (click)="downBack()">{{formData?.refundStatus==='3'?'下载回单':'暂无回单'}}</a>
|
||||
|
||||
@ -25,6 +25,8 @@ export class FreightAccountService extends ShipperBaseService {
|
||||
// 运营端获取平台余额
|
||||
$api_get_platform_account_header = '/api/fcc/accountBalance/getPlatformBalanceByOperator';
|
||||
// 运营端获取平台余额
|
||||
$api_get_platform_account_statistics = '/api/fcc/accountBalanceDetail/getAccountBalancePlatformIncomeDetailByOperator';
|
||||
// 运营端获取平台余额
|
||||
$api_get_platform_account_page = '/api/fcc/accountBalance/getPlatformAccountBalanceByOperator';
|
||||
// 运营端获取账户余额交易明细
|
||||
$api_get_platform_account_detail_page = '/api/fcc/accountBalanceDetail/getAccountBalanceByPage';
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
* @Author : Shiming
|
||||
* @Date : 2022-01-12 10:52:50
|
||||
* @LastEditors : Shiming
|
||||
* @LastEditTime : 2022-02-24 20:03:23
|
||||
* @LastEditTime : 2022-02-28 17:00:48
|
||||
* @FilePath : \\tms-obc-web\\src\\app\\routes\\insurance-management\\components\\list\\list.component.html
|
||||
* Copyright (C) 2022 huzhenhong. All rights reserved.
|
||||
-->
|
||||
@ -91,6 +91,11 @@
|
||||
<div>
|
||||
{{ item?.billCode }}
|
||||
</div>
|
||||
</ng-template>
|
||||
<ng-template st-row="resourceCode" let-item let-index="index">
|
||||
<div>
|
||||
{{ item?.resourceCode }}
|
||||
</div>
|
||||
<div>
|
||||
{{ item?.resourceStatusLabel }}
|
||||
</div>
|
||||
|
||||
@ -213,9 +213,10 @@ export class insuranceManagementListComponent implements OnInit {
|
||||
_$expand: (value: boolean) => value
|
||||
},
|
||||
onSearch: (q: any) => {
|
||||
if (!!q) {
|
||||
let str =q.replace(/^\s+|\s+$/g,"");
|
||||
if (str) {
|
||||
return this.service
|
||||
.request(this.service.$api_enterpriceList, { enterpriseName: q })
|
||||
.request(this.service.$api_enterpriceList, { enterpriseName: str })
|
||||
.pipe(map((res: any) => (res as any[]).map(i => ({ label: i.enterpriseName, value: i.id } as SFSchemaEnum))))
|
||||
.toPromise();
|
||||
} else {
|
||||
@ -412,7 +413,7 @@ export class insuranceManagementListComponent implements OnInit {
|
||||
{
|
||||
title: '货源编号',
|
||||
className: 'text-right',
|
||||
index: 'resourceCode',
|
||||
render: 'resourceCode',
|
||||
width: '150px'
|
||||
},
|
||||
{
|
||||
@ -480,6 +481,7 @@ export class insuranceManagementListComponent implements OnInit {
|
||||
{
|
||||
text: '查看保单',
|
||||
click: _record => this.showImg(_record),
|
||||
iif: item => item.insureStatus == '2'
|
||||
// acl: { ability: ['VEHICLE-LIST-view'] },
|
||||
// iif: item =>
|
||||
// item.billStatus == '4' || item.billStatus == '5' || item.billStatus == '2' || item.billStatus == '3' || item.billStatus == '1'
|
||||
@ -487,6 +489,7 @@ export class insuranceManagementListComponent implements OnInit {
|
||||
{
|
||||
text: '退保费',
|
||||
click: _record => this.retreatPrice(_record),
|
||||
iif: item => item.insureStatus == '2'
|
||||
// acl: { ability: ['VEHICLE-LIST-view'] },
|
||||
}
|
||||
]
|
||||
@ -531,7 +534,7 @@ export class insuranceManagementListComponent implements OnInit {
|
||||
nzContent: '退还后不可撤销,请谨慎操作!',
|
||||
nzCancelText: '取消',
|
||||
nzOnOk: () => {
|
||||
this.service.request(this.service.$api_del_many, [value.id]).subscribe(res => {
|
||||
this.service.request(this.service.$api_get_addINPBillRefundApplication, {id: value.id}).subscribe(res => {
|
||||
if (res) {
|
||||
this.service.msgSrv.success('删除菜单成功');
|
||||
}
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
* @Author : Shiming
|
||||
* @Date : 2021-12-03 15:31:52
|
||||
* @LastEditors : Shiming
|
||||
* @LastEditTime : 2022-02-10 10:40:56
|
||||
* @LastEditTime : 2022-02-28 17:11:54
|
||||
* @FilePath : \\tms-obc-web\\src\\app\\routes\\insurance-management\\services\\insurance-management.service.ts
|
||||
* Copyright (C) 2022 huzhenhong. All rights reserved.
|
||||
*/
|
||||
@ -27,6 +27,8 @@ export class InsuranceManagementService extends ShipperBaseService {
|
||||
|
||||
// 保险费公司认证
|
||||
$api_get_submitAuthInfo = `/api/sdc/premiumInfo/submitAuthInfo`;
|
||||
// 退保费
|
||||
$api_get_addINPBillRefundApplication = `/billRefundApplication/addINPBillRefundApplication`;
|
||||
|
||||
constructor(public injector: Injector, public eaCacheSrv: EACacheService) {
|
||||
super(injector, eaCacheSrv);
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
* @Author : Shiming
|
||||
* @Date : 2021-12-24 16:58:02
|
||||
* @LastEditors : Shiming
|
||||
* @LastEditTime : 2022-01-20 20:32:44
|
||||
* @LastEditTime : 2022-03-01 13:42:44
|
||||
* @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.
|
||||
-->
|
||||
@ -89,6 +89,7 @@
|
||||
(click)="openMap('start', idx)"
|
||||
formControlName="loadAddress{{ idx }}"
|
||||
placeholder="请输入装货地"
|
||||
readonly="true"
|
||||
/>
|
||||
</nz-input-group>
|
||||
</div>
|
||||
@ -141,6 +142,7 @@
|
||||
formControlName="unloadAddress{{ idx }}"
|
||||
placeholder="请输入卸货地"
|
||||
name="unloadAddress{{ idx }}"
|
||||
readonly="true"
|
||||
/>
|
||||
</nz-input-group>
|
||||
</div>
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
* @Author : Shiming
|
||||
* @Date : 2021-12-06 20:20:26
|
||||
* @LastEditors : Shiming
|
||||
* @LastEditTime : 2022-02-15 14:52:18
|
||||
* @LastEditTime : 2022-03-02 11:14:37
|
||||
* @FilePath : \\tms-obc-web\\src\\app\\routes\\order-management\\components\\bulk-detail\\bulk-detail.component.html
|
||||
* Copyright (C) 2022 huzhenhong. All rights reserved.
|
||||
-->
|
||||
@ -62,17 +62,13 @@
|
||||
<div style="width: 60%; margin: 0 auto">
|
||||
|
||||
<nz-steps [nzCurrent]="i?.scheduleVOList?.length + 1" nzLabelPlacement="vertical">
|
||||
|
||||
<nz-step
|
||||
*ngFor="let item of i?.scheduleVOList"
|
||||
[nzTitle]="item.state"
|
||||
[nzSubtitle]="item.stateTime"
|
||||
[nzStatus]="item.displayStatus === 'SHOW' ? 'finish' : 'wait'"
|
||||
>
|
||||
|
||||
</nz-step>
|
||||
</nz-steps
|
||||
>
|
||||
></nz-step>
|
||||
</nz-steps>
|
||||
</div>
|
||||
</div>
|
||||
</nz-card>
|
||||
@ -95,8 +91,8 @@
|
||||
{{ i?.unloadPlanTime }}
|
||||
</sv>
|
||||
<sv label="接单数量"> {{ i?.acceptWeight }}吨,{{ i?.acceptVolume }}方,{{ i?.acceptNumber }}件 </sv>
|
||||
<sv label="装货数量"> {{ i?.acceptWeight }}吨,{{ i?.acceptVolume }}方,{{ i?.acceptNumber }}件 </sv>
|
||||
<sv label="卸货数量"> {{ i?.settlementWeight }}吨,{{ i?.settlementVolume }}方,{{ i?.acceptNumber }}件 </sv>
|
||||
<sv *ngIf="i?.billStatus =='3' || i?.billStatus =='4' || i?.billStatus =='5'" label="装货数量"> {{ i?.acceptWeight }}吨,{{ i?.acceptVolume }}方,{{ i?.acceptNumber }}件 </sv>
|
||||
<sv *ngIf="i?.billStatus =='4' || i?.billStatus =='5'" label="卸货数量"> {{ i?.settlementWeight }}吨,{{ i?.settlementVolume }}方,{{ i?.acceptNumber }}件 </sv>
|
||||
</sv-container>
|
||||
<div class="mt-md">
|
||||
<h4 class="text-md"
|
||||
@ -140,7 +136,8 @@
|
||||
</nz-card>
|
||||
<nz-card nzTitle="运费信息" #distannce3>
|
||||
<h2>{{i?.goodsInfoList?.[0]?.freightPrice}}{{i?.goodsInfoList?.[0]?.freightTypeLabel}}(以发货为准,保留小数)</h2>
|
||||
<st #st [data]="i?.billExpenseDetails" [columns]="logColumns" [ps]="0" [page]="{ show: false, showSize: false }">
|
||||
<st #st [data]="billExpenses" [columns]="logColumns" [ps]="0" [page]="{ show: false, showSize: false }">
|
||||
<ng-template st-row="PriceType" let-item let-index="index"> 到付 </ng-template>
|
||||
<ng-template st-row="price" let-item let-index="index">
|
||||
{{ item.price | currency }}
|
||||
</ng-template>
|
||||
@ -205,11 +202,11 @@
|
||||
<nz-card nzTitle="轨迹信息" style="width: 100%" [nzExtra]="extraTemplate" #distannce5>
|
||||
<div nz-row>
|
||||
<div nz-col [nzSpan]="12">
|
||||
<st #st [data]="i?.auditRecordList" [columns]="logColumns" [ps]="0" [page]="{ show: false, showSize: false }">
|
||||
</st>
|
||||
<st [scroll]="{y: '500px'}" #st [data]="addressItems" [columns]="logColumns" [ps]="0" [page]="{ show: false, showSize: false }">
|
||||
</st>
|
||||
</div>
|
||||
<div nz-col [nzSpan]="12">
|
||||
<amap-path-simplifier [MapList]="MapList"></amap-path-simplifier>
|
||||
<amap-path-simplifier [mapWidth]="'100%'" [mapHeight]="'600px'" [MapList]="MapList"></amap-path-simplifier>
|
||||
</div>
|
||||
</div>
|
||||
</nz-card>
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
* @Author : Shiming
|
||||
* @Date : 2021-12-06 20:20:26
|
||||
* @LastEditors : Shiming
|
||||
* @LastEditTime : 2022-02-22 10:16:11
|
||||
* @LastEditTime : 2022-03-02 11:15:45
|
||||
* @FilePath : \\tms-obc-web\\src\\app\\routes\\order-management\\components\\bulk-detail\\bulk-detail.component.ts
|
||||
* Copyright (C) 2022 huzhenhong. All rights reserved.
|
||||
*/
|
||||
@ -25,18 +25,19 @@ import format from 'date-fns/format';
|
||||
styleUrls: ['./bulk-detail.component.less']
|
||||
})
|
||||
export class OrderManagementBulkeDetailComponent implements OnInit {
|
||||
MapList: any;
|
||||
MapList: any[]=[];
|
||||
id = this.route.snapshot.params.id;
|
||||
billExpenses: any[] = []; //运费信息表格信息
|
||||
i: any;
|
||||
imges: any;
|
||||
totalObj: any;
|
||||
attObj: any;
|
||||
isVisible = false;
|
||||
logColumns: STColumn[] = [
|
||||
{ title: '款项', index: 'expenseName' },
|
||||
{ title: '款项', index: 'costName', render: 'PriceType' },
|
||||
{ title: '运输费(元)', render: 'price' },
|
||||
{ title: '附加费(元)', render: 'surcharge' },
|
||||
{ title: '支付时间', index: ' paymentTime' },
|
||||
{ title: '支付时间', index: 'paymentTime' },
|
||||
{
|
||||
title: '支付状态',
|
||||
className: 'text-center',
|
||||
@ -70,8 +71,10 @@ export class OrderManagementBulkeDetailComponent implements OnInit {
|
||||
this.service.request(this.service.$api_getBulkBillDetail, { id: this.id }).subscribe(res => {
|
||||
if (res) {
|
||||
this.i = res;
|
||||
this.attObj = this.i?.billExpenseDetails?.filter((data: any) => data.expenseCode === 'ATT')[0];
|
||||
this.totalObj = this.i?.billExpenseDetails?.filter((data: any) => data.expenseCode === 'TOTAL')[0];
|
||||
console.log(this.i.billExpenseDetails )
|
||||
this.billExpenses = this.i?.billExpenseDetails?.filter((data: any) => data.expenseCode === 'TRA');
|
||||
console.log(this.billExpenses )
|
||||
this.i.scheduleVOList = this.i?.scheduleVOList?.filter((data:any)=>data.displayStatus !=="HIDE");
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -122,17 +125,18 @@ export class OrderManagementBulkeDetailComponent implements OnInit {
|
||||
this.service.request(this.service.$api_get_getTrajectory, { id: this.id }).subscribe(res => {
|
||||
if (res) {
|
||||
const points = res.trackArray;
|
||||
let list :any[] = [];
|
||||
points?.forEach((item: any) => {
|
||||
this.MapList.push({
|
||||
list.push({
|
||||
name: item.hgt,
|
||||
lnglat: [Number((Number(item.lon) / 600000).toFixed(6)), Number((Number(item.lat) / 600000).toFixed(6))]
|
||||
});
|
||||
});
|
||||
this.MapList = list;
|
||||
this.addressItems = res.parkArray;
|
||||
if (this.addressItems && this.addressItems.length > 0) {
|
||||
if(this.addressItems && this.addressItems.length > 0){
|
||||
this.addressItems.forEach(item => {
|
||||
item.parkBte = this.getLocalTime(item.parkBte);
|
||||
item.parkEte = this.getLocalTime(item.parkEte);
|
||||
item.vinOutTime = this.getLocalTime(item.vinOutTime);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
* @Author : Shiming
|
||||
* @Date : 2022-01-12 10:52:50
|
||||
* @LastEditors : Shiming
|
||||
* @LastEditTime : 2022-02-28 13:59:36
|
||||
* @LastEditTime : 2022-03-02 14:56:27
|
||||
* @FilePath : \\tms-obc-web\\src\\app\\routes\\order-management\\components\\bulk\\bulk.component.html
|
||||
* Copyright (C) 2022 huzhenhong. All rights reserved.
|
||||
-->
|
||||
@ -32,11 +32,11 @@
|
||||
<sf #sf [schema]="schema" [ui]="ui" [compact]="true" [button]="'none'"></sf>
|
||||
</div>
|
||||
<div nz-col [nzSpan]="_$expand ? 24 : 6" [class.text-right]="_$expand">
|
||||
<button nz-button nzType="primary" [nzLoading]="service.http.loading" (click)="search()" acl [acl-ability]="['ORDER-BULK-search']"
|
||||
<button nz-button nzType="primary" [nzLoading]="loading" (click)="search()" acl [acl-ability]="['ORDER-BULK-search']"
|
||||
>查询</button
|
||||
>
|
||||
<button nz-button nzType="primary" [disabled]="service.http.loading">导出</button>
|
||||
<button nz-button [disabled]="service.http.loading" (click)="resetSF()">重置</button>
|
||||
<button nz-button nzType="primary" [disabled]="loading">导出</button>
|
||||
<button nz-button [disabled]="loading" (click)="resetSF()">重置</button>
|
||||
<button nz-button nzType="link" (click)="expandToggle()">
|
||||
{{ !_$expand ? '展开' : '收起' }}
|
||||
<i nz-icon [nzType]="!_$expand ? 'down' : 'up'"></i>
|
||||
@ -63,8 +63,8 @@
|
||||
[scroll]="{ x: '2000px' }"
|
||||
[data]="service.$api_get_listBulkPage"
|
||||
[columns]="columns"
|
||||
[req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' }, params: reqParams }"
|
||||
[res]="{ reName: { list: 'data.records', total: 'data.total' } }"
|
||||
[req]="{ process: beforeReq }"
|
||||
[res]="{ reName: { list: 'data.records', total: 'data.total' } , process: afterRes}"
|
||||
[page]="{ show: true, showSize: true, pageSizes: [10, 20, 30, 50, 100, 200, 300, 500, 1000] }"
|
||||
[loading]="service.http.loading"
|
||||
>
|
||||
@ -81,6 +81,9 @@
|
||||
<ng-template st-row="payeeName" let-item let-index="index">
|
||||
<div> {{ item?.payeeName }}/{{ item?.payeePhone }} </div>
|
||||
</ng-template>
|
||||
<ng-template st-row="createUserName" let-item let-index="index">
|
||||
<div> {{ item?.createUserName }}/{{ item?.createUserPhone }} </div>
|
||||
</ng-template>
|
||||
<ng-template st-row="billCode" let-item let-index="index">
|
||||
<a [routerLink]="'bulk-detail/' + item.id">{{ item.billCode }}</a>
|
||||
<div>
|
||||
@ -125,8 +128,8 @@
|
||||
[bordered]="true"
|
||||
[data]="service.$api_get_listChangeApply"
|
||||
[columns]="columnsFloat"
|
||||
[req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' }, params: changeParams }"
|
||||
[res]="{ reName: { list: 'data', total: 'data.total' } }"
|
||||
[req]="{ process: beforeReq }"
|
||||
[res]="{ reName: { list: 'data.records', total: 'data.total' } , process: afterRes}"
|
||||
[page]="{ show: true, showSize: true, pageSizes: [10, 20, 30, 50, 100, 200, 300, 500, 1000] }"
|
||||
>
|
||||
<ng-template st-row="order" let-item let-index="index">
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import { Component, OnInit, ViewChild } from '@angular/core';
|
||||
import { STColumn, STComponent } from '@delon/abc/st';
|
||||
import { STColumn, STComponent, STRequestOptions } from '@delon/abc/st';
|
||||
import { SFComponent, SFDateWidgetSchema, SFSchema, SFSchemaEnum, SFSelectWidgetSchema, SFUISchema } from '@delon/form';
|
||||
import { ModalHelper, _HttpClient } from '@delon/theme';
|
||||
import { NzModalService } from 'ng-zorro-antd/modal';
|
||||
@ -27,6 +27,7 @@ export class OrderManagementBulkComponent implements OnInit {
|
||||
isVisibleEvaluate = false;
|
||||
isVisible = false;
|
||||
_$expand = false;
|
||||
loading: boolean = true;
|
||||
changeId: any; // 主页面查看运费变更记录id - 用于运费变更记录
|
||||
changeViewId: any; // 查看运费变更记录id - 用于查看
|
||||
ViewCause: any; // 变更运费查看数据
|
||||
@ -44,20 +45,6 @@ export class OrderManagementBulkComponent implements OnInit {
|
||||
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,
|
||||
@ -94,6 +81,34 @@ export class OrderManagementBulkComponent implements OnInit {
|
||||
}
|
||||
};
|
||||
}
|
||||
beforeReq = (requestOptions: STRequestOptions) => {
|
||||
const a: any = {};
|
||||
if (this.resourceStatus) {
|
||||
a.billStatus = this.resourceStatus;
|
||||
}
|
||||
const params: any = Object.assign({}, this.sf?.value || {});
|
||||
delete params._$expand;
|
||||
if (this.sf) {
|
||||
Object.assign(requestOptions.body, {
|
||||
...a,
|
||||
...params,
|
||||
createTime: {
|
||||
start: this.sf?.value?.createTime?.[0] || '',
|
||||
end: this.sf?.value?.createTime?.[1] || ''
|
||||
}
|
||||
});
|
||||
}
|
||||
this.loading = true;
|
||||
return requestOptions;
|
||||
};
|
||||
afterRes = (data: any[], rawData?: any) => {
|
||||
console.log(data)
|
||||
this.loading = false
|
||||
return data.map(item => ({
|
||||
...item,
|
||||
disabled: item.billStatus !== '4'
|
||||
}));
|
||||
};
|
||||
get selectedRows() {
|
||||
return this.st?.list.filter(item => item.checked) || [];
|
||||
}
|
||||
@ -182,9 +197,10 @@ export class OrderManagementBulkComponent implements OnInit {
|
||||
searchLoadingText: '搜索中...',
|
||||
allowClear: true,
|
||||
onSearch: (q: any) => {
|
||||
if (!!q) {
|
||||
let str =q.replace(/^\s+|\s+$/g,"");
|
||||
if (str) {
|
||||
return this.service
|
||||
.request(this.service.$api_enterpriceList, { enterpriseName: q })
|
||||
.request(this.service.$api_enterpriceList, { enterpriseName: str })
|
||||
.pipe(map((res: any) => (res as any[]).map(i => ({ label: i.enterpriseName, value: i.id } as SFSchemaEnum))))
|
||||
.toPromise();
|
||||
} else {
|
||||
@ -413,6 +429,7 @@ export class OrderManagementBulkComponent implements OnInit {
|
||||
className: 'text-right',
|
||||
render: 'mybidDetailInfo'
|
||||
},
|
||||
{ title: '录单员', render: 'createUserName', width: '200px', className: 'text-left' },
|
||||
{ title: '网络货运人', index: 'enterpriseInfoName', width: '250px', className: 'text-left' },
|
||||
{ title: '货主', index: 'shipperAppUserName', width: '250px', className: 'text-left' },
|
||||
{ title: '所属项目', index: 'enterpriseProjectName', width: '250px', className: 'text-left' },
|
||||
|
||||
@ -156,9 +156,10 @@ export class OrderManagementComplianceAuditComponent implements OnInit {
|
||||
searchLoadingText: '搜索中...',
|
||||
allowClear: true,
|
||||
onSearch: (q: any) => {
|
||||
if (!!q) {
|
||||
let str =q.replace(/^\s+|\s+$/g,"");
|
||||
if (str) {
|
||||
return this.service
|
||||
.request(this.service.$api_enterpriceList, { enterpriseName: q })
|
||||
.request(this.service.$api_enterpriceList, { enterpriseName: str })
|
||||
.pipe(map((res: any) => (res as any[]).map(i => ({ label: i.enterpriseName, value: i.id } as SFSchemaEnum))))
|
||||
.toPromise();
|
||||
} else {
|
||||
|
||||
@ -131,9 +131,10 @@ export class OrderManagementReceiptsAuditComponent implements OnInit {
|
||||
searchLoadingText: '搜索中...',
|
||||
allowClear: true,
|
||||
onSearch: (q: any) => {
|
||||
if (!!q) {
|
||||
let str =q.replace(/^\s+|\s+$/g,"");
|
||||
if (str) {
|
||||
return this.service
|
||||
.request(this.service.$api_enterpriceList, { enterpriseName: q })
|
||||
.request(this.service.$api_enterpriceList, { enterpriseName: str })
|
||||
.pipe(map((res: any) => (res as any[]).map(i => ({ label: i.enterpriseName, value: i.id } as SFSchemaEnum))))
|
||||
.toPromise();
|
||||
} else {
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
* @Author : Shiming
|
||||
* @Date : 2021-12-23 13:39:58
|
||||
* @LastEditors : Shiming
|
||||
* @LastEditTime : 2022-02-28 13:40:47
|
||||
* @LastEditTime : 2022-03-01 13:41:57
|
||||
* @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.
|
||||
-->
|
||||
@ -78,6 +78,7 @@
|
||||
(click)="openMap('start', idx)"
|
||||
formControlName="loadAddress{{ idx }}"
|
||||
placeholder="请输入装货地"
|
||||
readonly="true"
|
||||
/>
|
||||
</nz-input-group>
|
||||
<!-- <span style="padding: 0 10px"
|
||||
@ -130,6 +131,7 @@
|
||||
(click)="openMap('end', idx)"
|
||||
formControlName="unloadAddress{{ idx }}"
|
||||
placeholder="请输入卸货地"
|
||||
readonly="true"
|
||||
/>
|
||||
</nz-input-group>
|
||||
<!-- <span style="padding: 0 10px"
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
* @Author : Shiming
|
||||
* @Date : 2021-12-28 14:42:03
|
||||
* @LastEditors : Shiming
|
||||
* @LastEditTime : 2022-02-28 13:40:31
|
||||
* @LastEditTime : 2022-03-02 16:28:37
|
||||
* @FilePath : \\tms-obc-web\\src\\app\\routes\\order-management\\components\\vehicle-detail\\vehicle-detail.component.html
|
||||
* Copyright (C) 2022 huzhenhong. All rights reserved.
|
||||
-->
|
||||
@ -62,18 +62,11 @@
|
||||
<div class="approval-status">
|
||||
<div style="width: 60%; margin: 0 auto">
|
||||
|
||||
<nz-steps [nzCurrent]="approvalLsit?.length + 1" nzLabelPlacement="vertical">
|
||||
|
||||
<nz-step
|
||||
*ngFor="let item of approvalLsit"
|
||||
[nzTitle]="item?.state"
|
||||
[nzSubtitle]="item?.stateTime"
|
||||
[nzStatus]="item?.displayStatus === 'SHOW' ? 'finish' : 'wait'"
|
||||
>
|
||||
|
||||
</nz-step>
|
||||
</nz-steps
|
||||
>
|
||||
<nz-steps [nzCurrent]="i?.scheduleVOList?.length + 1" nzLabelPlacement="vertical">
|
||||
<nz-step *ngFor="let item of i?.scheduleVOList" [nzTitle]="item.state" [nzSubtitle]="item.stateTime"
|
||||
[nzDescription]="item.cancelReason ? '取消原因:' + item.cancelReason : ''"
|
||||
[nzStatus]="item.displayStatus === 'SHOW' ? 'finish' : 'wait'"></nz-step>
|
||||
</nz-steps>
|
||||
</div>
|
||||
</div>
|
||||
</nz-card>
|
||||
@ -139,7 +132,7 @@
|
||||
<nz-card nzTitle="保险待定"> </nz-card>
|
||||
|
||||
<nz-card nzTitle="运费信息" #distannce3>
|
||||
<st #st [data]="i?.billExpenseDetails" [columns]="logColumns" [ps]="0" [page]="{ show: false, showSize: false }">
|
||||
<st #st [data]="billExpenses" [columns]="logColumns" [ps]="0" [page]="{ show: false, showSize: false }">
|
||||
<ng-template st-row="price" let-item let-index="index">
|
||||
{{ item.price | currency }}
|
||||
</ng-template>
|
||||
@ -202,11 +195,11 @@
|
||||
<nz-card nzTitle="轨迹信息" style="width: 100%" id="distannce5" [nzExtra]="extraTemplate" #distannce5>
|
||||
<div nz-row>
|
||||
<div nz-col [nzSpan]="12">
|
||||
<st #st [data]="i?.auditRecordList" [columns]="logColumns" [ps]="0" [page]="{ show: false, showSize: false }">
|
||||
<st [scroll]="{y: '500px'}" #st [data]="addressItems" [columns]="logColumns" [ps]="0" [page]="{ show: false, showSize: false }">
|
||||
</st>
|
||||
</div>
|
||||
<div nz-col [nzSpan]="12">
|
||||
<amap-path-simplifier [MapList]="MapList"></amap-path-simplifier>
|
||||
<amap-path-simplifier [mapWidth]="'100%'" [mapHeight]="'600px'" [MapList]="MapList"></amap-path-simplifier>
|
||||
</div>
|
||||
</div>
|
||||
</nz-card>
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
* @Author : Shiming
|
||||
* @Date : 2021-12-28 14:42:03
|
||||
* @LastEditors : Shiming
|
||||
* @LastEditTime : 2022-02-28 11:45:39
|
||||
* @LastEditTime : 2022-03-02 16:19:31
|
||||
* @FilePath : \\tms-obc-web\\src\\app\\routes\\order-management\\components\\vehicle-detail\\vehicle-detail.component.ts
|
||||
* Copyright (C) 2022 huzhenhong. All rights reserved.
|
||||
*/
|
||||
@ -23,37 +23,22 @@ import { OrderManagementService } from '../../services/order-management.service'
|
||||
})
|
||||
export class OrderManagementVehicleDetailComponent implements OnInit {
|
||||
id = this.route.snapshot.params.id;
|
||||
MapList: any;
|
||||
MapList: any[]=[];
|
||||
i: any = {
|
||||
unLoadingPlaceList: [],
|
||||
billExpenseDetails: [],
|
||||
goodsInfoList: [],
|
||||
goodsResource: []
|
||||
};
|
||||
billExpenses: any[] = []; //运费信息表格信息
|
||||
imges: any;
|
||||
attObj: any;
|
||||
totalObj: any;
|
||||
approvalLsit: any;
|
||||
isVisible = false;
|
||||
logColumns: STColumn[] = [
|
||||
{ title: '款项', index: 'expenseCodeLabel' },
|
||||
{ title: '小计(元)', render: 'price' },
|
||||
{ title: '运输费(元)', render: 'price' },
|
||||
{ title: '附加费(元)', render: 'surcharge' },
|
||||
{ title: '支付时间', index: 'paymentTime' },
|
||||
{
|
||||
title: '支付状态',
|
||||
className: 'text-center',
|
||||
index: 'paymentStatus',
|
||||
type: 'badge',
|
||||
width: '120px',
|
||||
badge: {
|
||||
'1': { text: '待申请', color: 'warning' },
|
||||
'2': { text: '已支付', color: 'success' },
|
||||
'3': { text: '已拒绝', color: 'warning' },
|
||||
'4': { text: '申请中', color: 'warning' }
|
||||
}
|
||||
}
|
||||
{ title: '时间', index: 'vinOutTime' },
|
||||
{ title: '地点', index: 'cityName' },
|
||||
];
|
||||
trajectory = 'car';
|
||||
addressItems: any[] = []; //打点地址数据组
|
||||
@ -68,21 +53,15 @@ export class OrderManagementVehicleDetailComponent implements OnInit {
|
||||
|
||||
ngOnInit(): void {
|
||||
this.initData();
|
||||
this.MapInit();
|
||||
this.MapInit()
|
||||
}
|
||||
|
||||
initData() {
|
||||
this.service.request(this.service.$api_get_getWholeBillDetail, { id: this.id }).subscribe(res => {
|
||||
if (res) {
|
||||
this.i = res;
|
||||
this.approvalLsit = res.scheduleVOList;
|
||||
this.attObj = this.i?.billExpenseDetails?.filter((data: any) => data.expenseCode === 'ATT')[0];
|
||||
this.totalObj = this.i?.billExpenseDetails?.filter((data: any) => data.expenseCode === 'TOTAL')[0];
|
||||
this.approvalLsit.map((item: any, key: any) => {
|
||||
if (item.displayStatus === 'HIDE') {
|
||||
delete this.approvalLsit[key];
|
||||
}
|
||||
});
|
||||
this.billExpenses = this.i?.billExpenseDetails?.filter((data:any)=>data.expenseCode ==="PRE" || data.expenseCode ==="RECE" ||data.expenseCode ==="BACK" )
|
||||
this.i.scheduleVOList = this.i?.scheduleVOList?.filter((data:any)=>data.displayStatus !=="HIDE");
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -129,39 +108,23 @@ export class OrderManagementVehicleDetailComponent implements OnInit {
|
||||
// elf['elementRef'].nativeElement.className = 'target-fix'
|
||||
}
|
||||
}
|
||||
// MapInit() {
|
||||
// this.service.request('/api/sdc/billShipper/getTrajectoryByBillId', { id: this.id }).subscribe(res => {
|
||||
// if (res?.trackArray) {
|
||||
// const points = res?.trackArray;
|
||||
// const list: any[] = [];
|
||||
// points.forEach((item: any) => {
|
||||
// list.push({
|
||||
// name: item?.hgt,
|
||||
// lnglat: [Number((Number(item?.lon) / 600000).toFixed(6)), Number((Number(item?.lat) / 600000).toFixed(6))]
|
||||
// });
|
||||
// });
|
||||
// console.log(list);
|
||||
// this.MapList = list;
|
||||
// }
|
||||
// });
|
||||
// }
|
||||
|
||||
// 获取轨迹
|
||||
MapInit() {
|
||||
this.service.request(this.service.$api_get_getTrajectory, { id: this.id }).subscribe(res => {
|
||||
if (res) {
|
||||
const points = res.trackArray;
|
||||
let list :any[] = [];
|
||||
points?.forEach((item: any) => {
|
||||
this.MapList.push({
|
||||
list.push({
|
||||
name: item.hgt,
|
||||
lnglat: [Number((Number(item.lon) / 600000).toFixed(6)), Number((Number(item.lat) / 600000).toFixed(6))]
|
||||
});
|
||||
});
|
||||
this.MapList = list;
|
||||
this.addressItems = res.parkArray;
|
||||
if (this.addressItems && this.addressItems.length > 0) {
|
||||
if(this.addressItems && this.addressItems.length > 0){
|
||||
this.addressItems.forEach(item => {
|
||||
item.parkBte = this.getLocalTime(item.parkBte);
|
||||
item.parkEte = this.getLocalTime(item.parkEte);
|
||||
item.vinOutTime = this.getLocalTime(item.vinOutTime);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
* @Author : Shiming
|
||||
* @Date : 2022-01-12 10:52:50
|
||||
* @LastEditors : Shiming
|
||||
* @LastEditTime : 2022-02-28 13:59:54
|
||||
* @LastEditTime : 2022-03-02 14:57:31
|
||||
* @FilePath : \\tms-obc-web\\src\\app\\routes\\order-management\\components\\vehicle\\vehicle.component.html
|
||||
* Copyright (C) 2022 huzhenhong. All rights reserved.
|
||||
-->
|
||||
@ -32,9 +32,9 @@
|
||||
<sf #sf [schema]="schema" [ui]="ui" [compact]="true" [button]="'none'"></sf>
|
||||
</div>
|
||||
<div nz-col [nzSpan]="_$expand ? 24 : 6" class="text-right">
|
||||
<button nz-button nzType="primary" [nzLoading]="service.http.loading" (click)="search()" acl [acl-ability]="['ORDER-VEHICLE-search']">查询</button>
|
||||
<button nz-button nzType="primary" [disabled]="service.http.loading">导出</button>
|
||||
<button nz-button [disabled]="service.http.loading" (click)="resetSF()">重置</button>
|
||||
<button nz-button nzType="primary" [nzLoading]="loading" (click)="search()" acl [acl-ability]="['ORDER-VEHICLE-search']">查询</button>
|
||||
<button nz-button nzType="primary" [disabled]="loading">导出</button>
|
||||
<button nz-button [disabled]="loading" (click)="resetSF()">重置</button>
|
||||
<button nz-button nzType="link" (click)="expandToggle()">
|
||||
{{ !_$expand ? '展开' : '收起' }}
|
||||
<i nz-icon [nzType]="!_$expand ? 'down' : 'up'"></i>
|
||||
@ -62,8 +62,8 @@
|
||||
[scroll]="{ x: '1200px' }"
|
||||
[data]="service.$api_get_listWholePage"
|
||||
[columns]="columns"
|
||||
[req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' }, params: reqParams }"
|
||||
[res]="{ reName: { list: 'data.records', total: 'data.total' } }"
|
||||
[req]="{ process: beforeReq }"
|
||||
[res]="{ reName: { list: 'data.records', total: 'data.total' } , process: afterRes}"
|
||||
[page]="{ show: true, showSize: true, pageSizes: [10, 20, 30, 50, 100, 200, 300, 500, 1000] }"
|
||||
>
|
||||
<ng-template st-row="billCode" let-item let-index="index">
|
||||
@ -83,6 +83,9 @@
|
||||
<span>{{ item?.goodsNumber ? item?.goodsNumber + '件' : '' }}</span>
|
||||
</div>
|
||||
</ng-template>
|
||||
<ng-template st-row="createUserName" let-item let-index="index">
|
||||
<div> {{ item?.createUserName }}/{{ item?.createUserPhone }} </div>
|
||||
</ng-template>
|
||||
<ng-template st-row="mybidDetailInfo" let-item let-index="index">
|
||||
<div *ngIf="item.mybidDetailInfo.length > 0">
|
||||
<p *ngFor="let data of item.mybidDetailInfo">
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
import { Component, OnInit, ViewChild } from '@angular/core';
|
||||
import { Router, ActivatedRoute } from '@angular/router';
|
||||
import { STColumn, STComponent } from '@delon/abc/st';
|
||||
import { STColumn, STComponent, STRequestOptions } from '@delon/abc/st';
|
||||
import { SFComponent, SFDateWidgetSchema, SFSchema, SFSchemaEnum, SFSelectWidgetSchema, SFUISchema } from '@delon/form';
|
||||
import { ShipperBaseService } from '@shared';
|
||||
import { NzModalService } from 'ng-zorro-antd/modal';
|
||||
@ -12,6 +12,7 @@ import { VehicleFreightPeopleComponent } from '../../modal/vehicle/freight-peopl
|
||||
import { VehicleModifyCaptainComponent } from '../../modal/vehicle/modify-captain/modify-captain.component';
|
||||
import { VehicleModifyRateComponent } from '../../modal/vehicle/modify-rate/modify-rate.component';
|
||||
import { VehicleUpdateFreightComponent } from '../../modal/vehicle/update-freight/update-freight.component';
|
||||
import { OneCarOrderViewtrackComponent } from '../../modal/vehicle/view-track/view-track.component';
|
||||
import { OrderManagementService } from '../../services/order-management.service';
|
||||
|
||||
|
||||
@ -27,6 +28,7 @@ export class OrderManagementVehicleComponent implements OnInit {
|
||||
isVisibleView = false;
|
||||
isVisibleEvaluate = false;
|
||||
isVisible = false;
|
||||
loading: boolean = true;
|
||||
changeId: any; // 主页面查看运费变更记录id - 用于运费变更记录
|
||||
changeViewId: any; // 查看运费变更记录id - 用于查看
|
||||
ViewCause: any; // 变更运费查看数据
|
||||
@ -102,6 +104,33 @@ resourceStatus: any;
|
||||
},
|
||||
};
|
||||
}
|
||||
beforeReq = (requestOptions: STRequestOptions) => {
|
||||
const a:any = {};
|
||||
if(this.resourceStatus) {
|
||||
a.billStatus = this.resourceStatus;
|
||||
}
|
||||
const params: any = Object.assign({}, this.sf?.value || {});
|
||||
delete params._$expand;
|
||||
if (this.sf) {
|
||||
Object.assign(requestOptions.body, {
|
||||
...a,
|
||||
...params,
|
||||
createTime: {
|
||||
start: this.sf?.value?.createTime?.[0] || '',
|
||||
end: this.sf?.value?.createTime?.[1] || '',
|
||||
},
|
||||
});
|
||||
}
|
||||
this.loading = true;
|
||||
return requestOptions;
|
||||
};
|
||||
afterRes = (data: any[], rawData?: any) => {
|
||||
console.log(data)
|
||||
this.loading = false
|
||||
return data.map(item => ({
|
||||
...item,
|
||||
}));
|
||||
};
|
||||
get selectedRows() {
|
||||
return this.st?.list.filter((item) => item.checked) || [];
|
||||
}
|
||||
@ -178,9 +207,10 @@ resourceStatus: any;
|
||||
searchLoadingText: '搜索中...',
|
||||
allowClear: true,
|
||||
onSearch: (q: any) => {
|
||||
if (!!q) {
|
||||
let str =q.replace(/^\s+|\s+$/g,"");
|
||||
if (str) {
|
||||
return this.service
|
||||
.request(this.service.$api_enterpriceList, { enterpriseName: q})
|
||||
.request(this.service.$api_enterpriceList, { enterpriseName: str})
|
||||
.pipe(map((res: any) => (res as any[]).map((i) => ({ label: i.enterpriseName, value: i.id } as SFSchemaEnum))))
|
||||
.toPromise();
|
||||
} else {
|
||||
@ -360,6 +390,7 @@ resourceStatus: any;
|
||||
className: 'text-right',
|
||||
render: 'mybidDetailInfo',
|
||||
},
|
||||
{ title: '录单员', render: 'createUserName', width: '200px', className: 'text-left' },
|
||||
{ title: '网络货运人', index: 'enterpriseInfoName', width: '250px', className: 'text-left' },
|
||||
{ title: '货主', index: 'shipperAppUserName', width: '250px', className: 'text-left' },
|
||||
{ title: '关联运单号', index: 'wayBillCode', width: '170px', className: 'text-left' },
|
||||
@ -458,8 +489,8 @@ resourceStatus: any;
|
||||
},
|
||||
{
|
||||
text: '查看轨迹 ',
|
||||
click: (_record) => this.cancellation(_record),
|
||||
iif: item => item.billStatus == '4' || item.billStatus == '5' || item.billStatus == '2' || item.billStatus == '3',
|
||||
click: (_record) => this.viewTrack(_record),
|
||||
iif: item => item.billStatus !== '1' && item.billStatus !== '6',
|
||||
// acl: { ability: ['VEHICLE-LIST-view'] },
|
||||
},
|
||||
|
||||
@ -856,4 +887,22 @@ resourceStatus: any;
|
||||
}
|
||||
});
|
||||
}
|
||||
/**
|
||||
*查看轨迹
|
||||
*/
|
||||
viewTrack(item: any) {
|
||||
const modalRef = this.modal.create({
|
||||
nzTitle: '查看轨迹',
|
||||
nzContent: OneCarOrderViewtrackComponent,
|
||||
nzWidth: '800px',
|
||||
nzComponentParams: {
|
||||
i: item,
|
||||
},
|
||||
nzFooter: null
|
||||
});
|
||||
modalRef.afterClose.subscribe((res: boolean) => {
|
||||
if(res) {
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
* @Author : Shiming
|
||||
* @Date : 2021-12-14 15:02:52
|
||||
* @LastEditors : Shiming
|
||||
* @LastEditTime : 2022-01-18 17:20:49
|
||||
* @LastEditTime : 2022-03-02 13:43:55
|
||||
* @FilePath : \\tms-obc-web\\src\\app\\routes\\order-management\\modal\\bulk\\confir-receipt\\confir-receipt.component.html
|
||||
* Copyright (C) 2022 huzhenhong. All rights reserved.
|
||||
-->
|
||||
@ -18,7 +18,7 @@ nzMessage="签收后不可再修改运费,请确保运费等信息准确无误
|
||||
<sv-container col="1">
|
||||
<sv label="货物单价">
|
||||
<span>
|
||||
{{detailList?.goodsInfoVO?.freightPrice}} {{detailList?.goodsInfoVO?.freightType}}
|
||||
{{detailList?.goodsInfoVO?.freightPrice}} {{detailList?.goodsInfoVO?.freightTypeLabel}}
|
||||
</span>
|
||||
</sv>
|
||||
<sv label="结算依据">
|
||||
@ -37,7 +37,7 @@ nzMessage="签收后不可再修改运费,请确保运费等信息准确无误
|
||||
<div>{{detailList?.goodsInfoVO?.weight}}吨</div>
|
||||
</sv>
|
||||
<sv label="装货体积">
|
||||
<div>{{detailList?.goodsInfoVO?.volume}}吨</div>
|
||||
<div>{{detailList?.goodsInfoVO?.volume}}方</div>
|
||||
</sv>
|
||||
</sv-container>
|
||||
<sv-container col="2">
|
||||
@ -50,7 +50,7 @@ nzMessage="签收后不可再修改运费,请确保运费等信息准确无误
|
||||
</sv-container>
|
||||
<sv-container col="1">
|
||||
<sv label="总运费">
|
||||
<div>{{detailList?.price}} 元</div>
|
||||
<div>{{detailList?.price | currency}} 元</div>
|
||||
</sv>
|
||||
<sv label="司机车辆">
|
||||
<div>{{detailList?.driverName}} / {{detailList?.driverPhone}}/ {{detailList?.carNo}}</div>
|
||||
@ -69,7 +69,7 @@ nzMessage="签收后不可再修改运费,请确保运费等信息准确无误
|
||||
[nzPreview]="handlePreview1"
|
||||
[nzBeforeUpload]="beforeUpload"
|
||||
(nzChange)="handleChange1($event)"
|
||||
>beforeUpload
|
||||
>
|
||||
<div>
|
||||
<i nz-icon nzType="plus"></i>
|
||||
<div style="margin-top: 8px">请上传图片</div>
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
* @Author : Shiming
|
||||
* @Date : 2021-12-14 14:03:07
|
||||
* @LastEditors : Shiming
|
||||
* @LastEditTime : 2022-02-23 14:20:32
|
||||
* @LastEditTime : 2022-03-01 19:27:32
|
||||
* @FilePath : \\tms-obc-web\\src\\app\\routes\\order-management\\modal\\bulk\\update-freight\\update-freight.component.html
|
||||
* Copyright (C) 2022 huzhenhong. All rights reserved.
|
||||
-->
|
||||
@ -19,6 +19,7 @@
|
||||
[ngModel]="i.value"
|
||||
(ngModelChange)="i.setValue($event)"
|
||||
placeholder="请输入"
|
||||
(change)="changeNumVal()"
|
||||
oninput="if(value>99999)value=99999;if(value<0)value=0"
|
||||
/>
|
||||
</nz-input-group>
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
* @Author : Shiming
|
||||
* @Date : 2021-12-14 14:03:07
|
||||
* @LastEditors : Shiming
|
||||
* @LastEditTime : 2022-02-23 14:23:26
|
||||
* @LastEditTime : 2022-03-01 19:27:28
|
||||
* @FilePath : \\tms-obc-web\\src\\app\\routes\\order-management\\modal\\bulk\\update-freight\\update-freight.component.ts
|
||||
* Copyright (C) 2022 huzhenhong. All rights reserved.
|
||||
*/
|
||||
@ -50,7 +50,6 @@ export class UpdateFreightComponent implements OnInit {
|
||||
placeholder: '请输入',
|
||||
widget: 'custom',
|
||||
grid: { span: 12 },
|
||||
change: (val: any) => this.changeNumVal()
|
||||
} as SFStringWidgetSchema,
|
||||
default: data.freightPrice
|
||||
},
|
||||
@ -181,18 +180,19 @@ export class UpdateFreightComponent implements OnInit {
|
||||
}
|
||||
|
||||
changeNumVal() {
|
||||
console.log('444')
|
||||
if (this.calculateSub) {
|
||||
this.calculateSub.unsubscribe();
|
||||
}
|
||||
const params = { billId: this.data.billId, changeCause: this.sf.value.changeCause, dto: {...this.sf.value} }
|
||||
this.calculateSub = this.service
|
||||
.request(this.service.$api_calculate_cost, params)
|
||||
.subscribe((res: any) => {
|
||||
.subscribe(res => {
|
||||
if (res) {
|
||||
Object.assign(this.data, {
|
||||
totalAmount: res.totalAmount,
|
||||
totalFreight: res.totalFreight,
|
||||
freight: res.freight,
|
||||
surcharge: res.surcharge
|
||||
totalSurcharge: res.totalSurcharge
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
* @Author : Shiming
|
||||
* @Date : 2022-02-22 13:53:29
|
||||
* @LastEditors : Shiming
|
||||
* @LastEditTime : 2022-02-22 15:51:53
|
||||
* @LastEditTime : 2022-02-28 15:56:46
|
||||
* @FilePath : \\tms-obc-web\\src\\app\\routes\\order-management\\modal\\vehicle\\cancel-confirm\\cancel-confirm.component.ts
|
||||
* Copyright (C) 2022 huzhenhong. All rights reserved.
|
||||
*/
|
||||
@ -75,6 +75,7 @@ export class OneCarOrderCancelConfirmComponent implements OnInit {
|
||||
initData() {
|
||||
let indexId = 0
|
||||
let index = 0
|
||||
let indexSurcharge = 0
|
||||
this.i?.mybidDetailInfo.forEach((ele: any) => {
|
||||
if(this.sts == 1) {
|
||||
// 大宗
|
||||
@ -83,25 +84,21 @@ export class OneCarOrderCancelConfirmComponent implements OnInit {
|
||||
}
|
||||
if (ele?.paymentStatusLabel == '已支付') {
|
||||
indexId += 1;
|
||||
indexSurcharge += ele?.surcharge;
|
||||
}
|
||||
} else {
|
||||
// 整车
|
||||
if (ele?.paymentStatusLabel == '已支付') {
|
||||
indexId += 1;
|
||||
index += ele?.price;
|
||||
indexSurcharge += ele?.surcharge;
|
||||
}
|
||||
console.log(ele.expenseCode)
|
||||
}
|
||||
if (ele.expenseCode == '"ATT"' || ele.expenseCode == 'ATT'){
|
||||
if(ele?.paymentStatusLabel == '已支付') {
|
||||
this.ATTPrice = ele.price;
|
||||
} else {
|
||||
this.ATTPrice = 0;
|
||||
}
|
||||
}
|
||||
});
|
||||
this.index = indexId
|
||||
this.List = index
|
||||
this.ATTPrice = indexSurcharge
|
||||
console.log(this.index)
|
||||
console.log(this.List)
|
||||
}
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
* @Author : Shiming
|
||||
* @Date : 2021-12-15 13:17:42
|
||||
* @LastEditors : Shiming
|
||||
* @LastEditTime : 2022-01-18 17:21:57
|
||||
* @LastEditTime : 2022-03-02 13:50:12
|
||||
* @FilePath : \\tms-obc-web\\src\\app\\routes\\order-management\\modal\\vehicle\\confir-receipt\\confir-receipt.component.html
|
||||
* Copyright (C) 2022 huzhenhong. All rights reserved.
|
||||
-->
|
||||
@ -17,7 +17,20 @@
|
||||
|
||||
<sv-container col="1">
|
||||
<sv label="费用明细">
|
||||
<st #st [widthMode]="{ type: 'strict' }" [data]="costDetail" [columns]="columns" bordered="true" [page]="{ show: false }"></st>
|
||||
<st #st [widthMode]="{ type: 'strict' }" [data]="costDetail" [columns]="columns" bordered="true" [page]="{ show: false }">
|
||||
<ng-template st-row="PRE" let-item let-index="index">
|
||||
{{item.PRE | currency}}
|
||||
</ng-template>
|
||||
<ng-template st-row="RECE" let-item let-index="index">
|
||||
{{ item.RECE | currency }}
|
||||
</ng-template>
|
||||
<ng-template st-row="BACK" let-item let-index="index">
|
||||
{{ item.BACK | currency }}
|
||||
</ng-template>
|
||||
<ng-template st-row="traiPrice" let-item let-index="index">
|
||||
{{ item.traiPrice | currency }}
|
||||
</ng-template>
|
||||
</st>
|
||||
</sv>
|
||||
<sv label="司机车辆">
|
||||
<div>{{ dataInfo?.driverName }} / {{ dataInfo?.driverPhone }}/ {{ dataInfo?.carNo }}</div>
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
* @Author : Shiming
|
||||
* @Date : 2021-12-15 13:17:42
|
||||
* @LastEditors : Shiming
|
||||
* @LastEditTime : 2022-02-25 15:34:07
|
||||
* @LastEditTime : 2022-03-02 13:52:27
|
||||
* @FilePath : \\tms-obc-web\\src\\app\\routes\\order-management\\modal\\vehicle\\confir-receipt\\confir-receipt.component.ts
|
||||
* Copyright (C) 2022 huzhenhong. All rights reserved.
|
||||
*/
|
||||
@ -143,23 +143,27 @@ export class VehicleConfirReceiptComponent implements OnInit {
|
||||
this.columns = [
|
||||
{
|
||||
title: '预付',
|
||||
index: 'PRE'
|
||||
index: 'PRE',
|
||||
render:'PRE'
|
||||
},
|
||||
{
|
||||
title: '到付',
|
||||
index: 'RECE'
|
||||
},
|
||||
{
|
||||
title: '油卡',
|
||||
index: 'OIL'
|
||||
index: 'RECE',
|
||||
render:'RECE'
|
||||
},
|
||||
// {
|
||||
// title: '油卡',
|
||||
// index: 'OIL'
|
||||
// },
|
||||
{
|
||||
title: '回单付',
|
||||
index: 'BACK'
|
||||
index: 'BACK',
|
||||
render:'BACK'
|
||||
},
|
||||
{
|
||||
title: '总运费',
|
||||
index: 'traiPrice'
|
||||
index: 'traiPrice',
|
||||
render:'traiPrice'
|
||||
}
|
||||
];
|
||||
}
|
||||
|
||||
@ -0,0 +1,34 @@
|
||||
<!--
|
||||
* @Description :
|
||||
* @Version : 1.0
|
||||
* @Author : Shiming
|
||||
* @Date : 2022-02-22 13:53:29
|
||||
* @LastEditors : Shiming
|
||||
* @LastEditTime : 2022-03-02 16:18:46
|
||||
* @FilePath : \\tms-obc-web\\src\\app\\routes\\order-management\\modal\\vehicle\\view-track\\view-track.component.html
|
||||
* Copyright (C) 2022 huzhenhong. All rights reserved.
|
||||
-->
|
||||
<div>
|
||||
<nz-card nzTitle="轨迹信息" [nzExtra]="extraTemplate" >
|
||||
<div style="display: flex; flex: 1;">
|
||||
<div style=" flex: 1;">
|
||||
<st #st [scroll]="{y: '500px'}" [data]="addressItems" [columns]="logColumns" [ps]="0" [page]="{ show: false, showSize: false }">
|
||||
</st>
|
||||
</div>
|
||||
<div style="flex: 1;" >
|
||||
<amap-path-simplifier [mapWidth]="'100%'" [mapHeight]="'600px'" [MapList]="MapList"></amap-path-simplifier>
|
||||
</div>
|
||||
</div>
|
||||
</nz-card>
|
||||
<ng-template #extraTemplate>
|
||||
<nz-radio-group [(ngModel)]="trajectory">
|
||||
<label nz-radio-button nzValue="car">车辆轨迹</label>
|
||||
<label nz-radio-button nzValue="driver">司机轨迹</label>
|
||||
</nz-radio-group>
|
||||
</ng-template>
|
||||
</div>
|
||||
|
||||
<div class="modal-footer">
|
||||
<button nz-button type="button" (click)="close(false)">取消</button>
|
||||
<button nz-button type="submit" nzType="primary" (click)="close(true)">确认</button>
|
||||
</div>
|
||||
@ -0,0 +1,11 @@
|
||||
:host {
|
||||
::ng-deep {
|
||||
// .mapBox {
|
||||
// iframe, canvas {
|
||||
// width: 400px !important;
|
||||
// }
|
||||
// }
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,84 @@
|
||||
/*
|
||||
* @Description :
|
||||
* @Version : 1.0
|
||||
* @Author : Shiming
|
||||
* @Date : 2022-02-22 13:53:29
|
||||
* @LastEditors : Shiming
|
||||
* @LastEditTime : 2022-03-02 16:02:51
|
||||
* @FilePath : \\tms-obc-web\\src\\app\\routes\\order-management\\modal\\vehicle\\view-track\\view-track.component.ts
|
||||
* Copyright (C) 2022 huzhenhong. All rights reserved.
|
||||
*/
|
||||
import { Component, OnInit, ViewChild } from '@angular/core';
|
||||
import { STColumn } from '@delon/abc/st';
|
||||
import {
|
||||
SFComponent,
|
||||
SFCustomWidgetSchema,
|
||||
SFNumberWidgetSchema,
|
||||
SFRadioWidgetSchema,
|
||||
SFSchema,
|
||||
SFTextareaWidgetSchema,
|
||||
SFUISchema
|
||||
} from '@delon/form';
|
||||
import format from 'date-fns/format';
|
||||
import { _HttpClient } from '@delon/theme';
|
||||
import { NzMessageService } from 'ng-zorro-antd/message';
|
||||
import { NzModalRef, NzModalService } from 'ng-zorro-antd/modal';
|
||||
import { OrderManagementService } from '../../../services/order-management.service';
|
||||
|
||||
|
||||
@Component({
|
||||
selector: 'app-order-management-view-track',
|
||||
styleUrls: ['./view-track.component.less'],
|
||||
templateUrl: './view-track.component.html'
|
||||
})
|
||||
export class OneCarOrderViewtrackComponent implements OnInit {
|
||||
i: any; // 单行数据
|
||||
MapList:any[] = []; //地图点位数据组
|
||||
trajectory = 'car';
|
||||
addressItems: any[] = []; //打点地址数据组
|
||||
logColumns: STColumn[] = [
|
||||
{ title: '时间', index: 'vinOutTime' },
|
||||
{ title: '地点', index: 'cityName' },
|
||||
];
|
||||
constructor(
|
||||
private modalRef: NzModalRef,
|
||||
private modal: NzModalService,
|
||||
private msgSrv: NzMessageService,
|
||||
public service: OrderManagementService
|
||||
) {}
|
||||
|
||||
ngOnInit(): void {
|
||||
console.log(this.i);
|
||||
this.MapInit();
|
||||
|
||||
}
|
||||
// 获取轨迹
|
||||
MapInit() {
|
||||
this.service.request(this.service.$api_get_getTrajectory, { id: this.i.id }).subscribe(res => {
|
||||
if (res) {
|
||||
const points = res.trackArray;
|
||||
let list :any[] = [];
|
||||
points?.forEach((item: any) => {
|
||||
list.push({
|
||||
name: item.hgt,
|
||||
lnglat: [Number((Number(item.lon) / 600000).toFixed(6)), Number((Number(item.lat) / 600000).toFixed(6))]
|
||||
});
|
||||
});
|
||||
this.MapList = list;
|
||||
// this.addressItems = res.parkArray;
|
||||
this.addressItems = res.cityArray;
|
||||
if(this.addressItems && this.addressItems.length > 0){
|
||||
this.addressItems.forEach(item => {
|
||||
item.vinOutTime = this.getLocalTime(item.vinOutTime);
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
close(value: boolean): void {
|
||||
this.modalRef.close(false);
|
||||
}
|
||||
getLocalTime(time: any) {
|
||||
return format(new Date(parseInt(time)), 'yyyy-MM-dd HH:mm:ss');
|
||||
}
|
||||
}
|
||||
@ -36,6 +36,7 @@ import { VehicleModifyRateComponent } from './modal/vehicle/modify-rate/modify-r
|
||||
import { VehicleSureArriveComponent } from './modal/vehicle/sure-arrive/sure-arrive.component';
|
||||
import { VehicleSureDepartComponent } from './modal/vehicle/sure-depart/sure-depart.component';
|
||||
import { VehicleUpdateFreightComponent } from './modal/vehicle/update-freight/update-freight.component';
|
||||
import { OneCarOrderViewtrackComponent } from './modal/vehicle/view-track/view-track.component';
|
||||
import { OrderManagementRoutingModule } from './order-management-routing.module';
|
||||
|
||||
const COMPONENTS: Type<void>[] = [
|
||||
@ -62,7 +63,8 @@ const COMPONENTS: Type<void>[] = [
|
||||
OrderManagementReceiptsAuditComponent,
|
||||
orderManagementVoucherViewComponent,
|
||||
OrderManagementComplianceAuditComponent,
|
||||
OneCarOrderCancelConfirmComponent
|
||||
OneCarOrderCancelConfirmComponent,
|
||||
OneCarOrderViewtrackComponent
|
||||
];
|
||||
|
||||
@NgModule({
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
* @Author : Shiming
|
||||
* @Date : 2021-12-03 15:31:52
|
||||
* @LastEditors : Shiming
|
||||
* @LastEditTime : 2022-02-28 12:01:42
|
||||
* @LastEditTime : 2022-03-01 19:21:53
|
||||
* @FilePath : \\tms-obc-web\\src\\app\\routes\\order-management\\services\\order-management.service.ts
|
||||
* Copyright (C) 2022 huzhenhong. All rights reserved.
|
||||
*/
|
||||
|
||||
@ -1,66 +1,49 @@
|
||||
<!--
|
||||
* @Description :
|
||||
* @Version : 1.0
|
||||
* @Author : Shiming
|
||||
* @Date : 2021-12-03 11:10:14
|
||||
* @LastEditors : Shiming
|
||||
* @LastEditTime : 2022-01-18 17:27:30
|
||||
* @FilePath : \\tms-obc-web\\src\\app\\routes\\supply-management\\components\\assigned-car\\assigned-car.component.html
|
||||
* Copyright (C) 2022 huzhenhong. All rights reserved.
|
||||
-->
|
||||
<div>
|
||||
<div nz-row>
|
||||
<div nz-col nzSpan="18">
|
||||
<sf #sf [schema]="schema" mode="search" [ui]="ui" [compact]="true" (formSubmit)="st.load(1)" (formReset)="reset()"></sf>
|
||||
</div>
|
||||
<div nz-col nzSpan="6">
|
||||
<button nz-button nzType="primary" style="margin-bottom: 24px" (click)="addDriver()"><i nz-icon nzType="plus"></i>添加司机</button>
|
||||
<sf #sf [schema]="schema" mode="search" [ui]="ui" [compact]="true" (formSubmit)="st.load(1)"
|
||||
(formReset)="reset()"></sf>
|
||||
</div>
|
||||
<!-- <div nz-col nzSpan="6">
|
||||
<button nz-button nzType="primary" style="margin-bottom: 24px" (click)="addDriver()"><i nz-icon
|
||||
nzType="plus"></i>添加司机</button>
|
||||
</div> -->
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<st
|
||||
#st
|
||||
[data]="service.$api_get_practice_car_list"
|
||||
<st #st [data]="service.$api_get_practice_car_list"
|
||||
[req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' }, params: reqParams }"
|
||||
[columns]="columns"
|
||||
[res]="{ reName: { list: 'data.records', total: 'data.total' }, process: dataProcess }"
|
||||
[columns]="columns" [res]="{ reName: { list: 'data.records', total: 'data.total' },process:dataProcess }"
|
||||
[page]="{ show: true, showSize: true, pageSizes: [10, 20, 30, 50, 100, 200, 300, 500, 1000] }"
|
||||
(change)="changeSt($event)"
|
||||
>
|
||||
(change)="changeSt($event)">
|
||||
<ng-template st-row="carId" let-item let-index="index">
|
||||
<nz-select [(ngModel)]="item.carId" style="width: 280px">
|
||||
<nz-select [(ngModel)]="item.carId" style="width: 280px;">
|
||||
<nz-option [nzValue]="''" nzLabel="不限"></nz-option>
|
||||
<nz-option
|
||||
[nzValue]="car.carId"
|
||||
[nzLabel]="car.carNo"
|
||||
*ngFor="let car of item.userCarLicenseDesensitizationVOList"
|
||||
[nzCustomContent]="true"
|
||||
>
|
||||
<span>{{ car.carNo }} -</span>
|
||||
<span>{{ car.carLength }}米,{{ car.carLoad }}吨 -</span>
|
||||
<span *ngIf="car?.approvalStatus === 20 && !car.carStatus" class="text-success-dark">空闲</span>
|
||||
<span *ngIf="car?.approvalStatus === 20 && car.carStatus" class="text-warning-dark">已被指派</span>
|
||||
<nz-option [nzValue]="car.carId" [nzLabel]="car.carNo"
|
||||
*ngFor="let car of item.userCarLicenseDesensitizationVOList" [nzCustomContent]="true">
|
||||
<span>{{car.carNo}} -</span>
|
||||
<span>{{car.carLength}}米,{{car.carLoad}}吨 -</span>
|
||||
<span *ngIf="car?.approvalStatus === 20 && !car.carStatus " class="text-success-dark">空闲</span>
|
||||
<span *ngIf="car?.approvalStatus === 20 && car.carStatus " class="text-warning-dark">在途</span>
|
||||
<span *ngIf="car?.approvalStatus !== 20" class="text-red-dark">未认证</span>
|
||||
<!-- <span [ngClass]="cardBADGE[car.carStatus]?.color">{{cardBADGE[car.carStatus]?.text}}</span> -->
|
||||
</nz-option>
|
||||
</nz-select>
|
||||
</ng-template>
|
||||
<ng-template st-row="carCaptain" let-item let-index>
|
||||
<span>{{ item.captainName }} {{ item.captainPhone }}</span>
|
||||
<a (click)="setCarCaptain(item)">设置</a>
|
||||
<span>{{item.captainName}} {{item.captainPhone}}</span>
|
||||
<a (click)="verifyCanSetCarCaptain(item)">设置</a>
|
||||
</ng-template>
|
||||
<ng-template st-row="driverStatus" let-item let-index>
|
||||
<span *ngIf="item?.certificationStatus === 1 && item.driverStatus === 0" class="text-success-dark">空闲</span>
|
||||
<span *ngIf="item?.certificationStatus === 1 && item.driverStatus === 1" class="text-warning-dark">已被指派</span>
|
||||
<span *ngIf="item?.certificationStatus === 1 && item.driverStatus === 1" class="text-warning-dark">在途</span>
|
||||
<span *ngIf="item?.certificationStatus !== 1" class="text-red-dark">未认证</span>
|
||||
</ng-template>
|
||||
</st>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button nz-button type="button" (click)="close()">关闭</button>
|
||||
<button nz-button type="submit" nzType="primary" (click)="save()" [disabled]="!selectedRows" [nzLoading]="service.http.loading"
|
||||
>发布并指派给司机</button
|
||||
>
|
||||
<button nz-button type="submit" nzType="primary" (click)="verifyVechicleStatus(params)" [disabled]="!selectedRows"
|
||||
[nzLoading]="service.http.loading">发布并指派给司机</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -2,8 +2,9 @@ import { Component, OnInit, ViewChild } from '@angular/core';
|
||||
import { STChange, STColumn, STColumnBadge, STComponent, STData } from '@delon/abc/st';
|
||||
import { SFComponent, SFSchema, SFUISchema } from '@delon/form';
|
||||
import { ModalHelper, _HttpClient } from '@delon/theme';
|
||||
import { EAEnvironmentService } from '@shared';
|
||||
import { NzMessageService } from 'ng-zorro-antd/message';
|
||||
import { NzModalRef } from 'ng-zorro-antd/modal';
|
||||
import { NzModalRef, NzModalService } from 'ng-zorro-antd/modal';
|
||||
import { SupplyManagementService } from '../../services/supply-management.service';
|
||||
import { SupplyManagementAddDriversComponent } from '../add-drivers/add-drivers.component';
|
||||
import { CarAddmodalComponent } from '../addmodal/addmodal.component';
|
||||
@ -29,7 +30,6 @@ export class SupplyManagementVehicleAssignedCarComponent implements OnInit {
|
||||
@ViewChild('st') st!: STComponent;
|
||||
@ViewChild('sf', { static: false }) sf!: SFComponent;
|
||||
status: string = 'anew';
|
||||
type: any;
|
||||
url = ''; // 请求的api地址
|
||||
params: any = {}; // 传进来的参数
|
||||
cardBADGE: STColumnBadge | any = {
|
||||
@ -43,6 +43,8 @@ export class SupplyManagementVehicleAssignedCarComponent implements OnInit {
|
||||
private msgSrv: NzMessageService,
|
||||
public service: SupplyManagementService,
|
||||
private modalHelper: ModalHelper,
|
||||
private envSrv: EAEnvironmentService,
|
||||
private modalSrv: NzModalService
|
||||
) {
|
||||
this.initSF();
|
||||
this.initSt();
|
||||
@ -54,10 +56,14 @@ export class SupplyManagementVehicleAssignedCarComponent implements OnInit {
|
||||
get reqParams() {
|
||||
return {
|
||||
...this.sf?.value,
|
||||
loadingTime: this.params?.loadingTime,
|
||||
unloadingTime: this.params?.unloadingTime
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 初始化查询表单
|
||||
*/
|
||||
@ -67,14 +73,15 @@ export class SupplyManagementVehicleAssignedCarComponent implements OnInit {
|
||||
_$expand: { type: 'boolean', ui: { hidden: true } },
|
||||
nameOrPhone: {
|
||||
type: 'string',
|
||||
title: '',
|
||||
title: '承运司机',
|
||||
ui: {
|
||||
placeholder: '请输入司机姓名/手机号'
|
||||
}
|
||||
},
|
||||
carNo: {
|
||||
type: 'string',
|
||||
title: '',
|
||||
title: '车牌号',
|
||||
maxLength: 9,
|
||||
ui: {
|
||||
placeholder: '请输入车牌号'
|
||||
}
|
||||
@ -100,13 +107,12 @@ export class SupplyManagementVehicleAssignedCarComponent implements OnInit {
|
||||
}
|
||||
|
||||
ngOnInit(): void {
|
||||
console.log(this.type)
|
||||
}
|
||||
|
||||
dataProcess(data: STData[]): STData[] {
|
||||
return data.map((i, index) => {
|
||||
i.carId = '';
|
||||
i.disabled = i.carStatus === '1';
|
||||
i.disabled = (i?.certificationStatus === 1 && i.driverStatus === 1);
|
||||
const defaultCar = i?.userCarLicenseDesensitizationVOList?.find((item: any) => item.isDefault);
|
||||
if (defaultCar) {
|
||||
i.carId = defaultCar?.carId;
|
||||
@ -116,16 +122,15 @@ export class SupplyManagementVehicleAssignedCarComponent implements OnInit {
|
||||
}
|
||||
|
||||
save(): void {
|
||||
if (this.selectedRows) {
|
||||
const { carId, appUserId: driverId, captainAppUserId: carCaptainId } = this.selectedRows;
|
||||
const params: any = { carId, driverId, carCaptainId };
|
||||
this.service.request(this.url, { ...params, ...this.params }).subscribe((res: any) => {
|
||||
if (res) {
|
||||
this.modal.close(res);
|
||||
}
|
||||
})
|
||||
const { carId, appUserId: driverId, captainAppUserId: carCaptainId } = this.selectedRows;
|
||||
const params: any = { carId, driverId, carCaptainId };
|
||||
this.service.request(this.url, { ...params, ...this.params }).subscribe((res: any) => {
|
||||
if (res) {
|
||||
this.service.msgSrv.success('指派成功!');
|
||||
this.modal.close(res);
|
||||
}
|
||||
})
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
changeSt(e: STChange): void {
|
||||
@ -143,10 +148,28 @@ export class SupplyManagementVehicleAssignedCarComponent implements OnInit {
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 校验司机是否能设置车队长
|
||||
* @param item 当前对象
|
||||
*/
|
||||
verifyCanSetCarCaptain(item: any) {
|
||||
this.service.request(this.service.$api_get_sys_config, [{ itemKey: 'sys.config.shipper.setCarCaptain', businessId: this.envSrv.env.enterpriseId }]).subscribe(res => {
|
||||
if (res && res.length > 0) {
|
||||
const { itemValue } = res[0];
|
||||
if (itemValue !== '1') {
|
||||
this.service.msgSrv.error('不可设置车队长!');
|
||||
return;
|
||||
}
|
||||
this.setCarCaptain(item);
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置车队长
|
||||
*/
|
||||
setCarCaptain(item: any) {
|
||||
|
||||
this.modalHelper.create(SupplyManagementAddDriversComponent, { dirvierInfo: item }, {
|
||||
size: 900,
|
||||
modalOptions: { nzMaskClosable: false, nzTitle: '设置' }
|
||||
@ -168,4 +191,57 @@ export class SupplyManagementVehicleAssignedCarComponent implements OnInit {
|
||||
this.sf.reset();
|
||||
this.st.load(1);
|
||||
}
|
||||
|
||||
/**
|
||||
* 验证车辆的状态
|
||||
*/
|
||||
verifyVechicleStatus(params: any) {
|
||||
if (this.selectedRows) {
|
||||
const obj = this.status === 'anew' ? { resourceId: params.id } : { ...params };
|
||||
const { carId, appUserId: driverId, captainAppUserId: carCaptainId } = this.selectedRows;
|
||||
const carInfo: any = { carId, driverId, carCaptainId };
|
||||
this.service.request(this.service.$api_verify_vehicle_status, { ...obj, ...carInfo }).subscribe(res => {
|
||||
if (res) {
|
||||
const { title, alert, subContent, content } = res;
|
||||
switch (alert) {
|
||||
case 'Error':
|
||||
// if (code === '3' || code === '4' || code === '8') {
|
||||
// this.error(title, subContent, '#CF3834');
|
||||
// } else {
|
||||
this.error(title, content, subContent);
|
||||
break;
|
||||
case 'Warn':
|
||||
this.showConfirm(title, content, subContent);
|
||||
break;
|
||||
case 'Success':
|
||||
this.save();
|
||||
break;
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
error(title: string, content: string, subContent: string): void {
|
||||
this.modalSrv.error({
|
||||
nzTitle: title,
|
||||
nzContent: `<span class="text-error-dark">${content ? content : ''}</span><span class="text-grey-dark">${subContent ? subContent : ''}</span>`,
|
||||
nzOkText: '知道了'
|
||||
});
|
||||
}
|
||||
|
||||
showConfirm(title: string, content: string, subContent: string): void {
|
||||
this.modalSrv.confirm({
|
||||
nzTitle: title,
|
||||
nzContent: `<span class="text-error-dark">${content ? content : ''}</span><span class="text-grey-dark">${subContent ? subContent : ''}</span>`,
|
||||
nzOkText: '继续',
|
||||
nzCancelText: '取消',
|
||||
nzOnOk: () => {
|
||||
this.save();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ -13,16 +13,17 @@
|
||||
<div nz-row>
|
||||
<div nz-col nzSpan="14" class="text-grey-darker">网络货运人:{{ i?.shipperAppUserName }}</div>
|
||||
<div nz-col nzSpan="10">
|
||||
<button nz-button (click)="cancleGoodsSource()" *ngIf="i?.resourceStatus === '1'" acl [acl-ability]="['SUPPLY-BULK-DETAIL-cancelSupply']">取消货源</button>
|
||||
<button nz-button (click)="updatePrice(i)" *ngIf="i?.resourceStatus === '1'" acl [acl-ability]="['SUPPLY-BULK-DETAIL-updatePrice']">修改单价</button>
|
||||
<button nz-button nzType="primary" nzGhost (click)="placeOrder(i)" acl [acl-ability]="['SUPPLY-BULK-DETAIL-bulkAnotherOrder']">再下一单</button>
|
||||
<button nz-button (click)="cancleGoodsSource()" *ngIf="i?.resourceStatus === '1'" acl
|
||||
[acl-ability]="['SUPPLY-BULK-DETAIL-cancelSupply']">取消货源</button>
|
||||
<button nz-button (click)="updatePrice(i)" *ngIf="i?.resourceStatus === '1'" acl
|
||||
[acl-ability]="['SUPPLY-BULK-DETAIL-updatePrice']">修改单价</button>
|
||||
<button nz-button nzType="primary" nzGhost (click)="placeOrder(i)" acl
|
||||
[acl-ability]="['SUPPLY-BULK-DETAIL-bulkAnotherOrder']">再下一单</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mt-sm mb-sm" nz-row>
|
||||
<div>
|
||||
<b
|
||||
>总费用:<span class="text-red-light text-md">{{ i?.totalAmount | currency: '¥' }}</span></b
|
||||
>
|
||||
<b>总费用:<span class="text-red-light text-md">{{ i?.totalAmount | currency: '¥' }}</span></b>
|
||||
</div>
|
||||
</div>
|
||||
<nz-divider></nz-divider>
|
||||
@ -39,19 +40,14 @@
|
||||
<div class="approval-status">
|
||||
<div style="width: 60%; margin: 0 auto">
|
||||
<nz-steps style="width: 70%; margin: 0 auto" [nzLabelPlacement]="'vertical'">
|
||||
<nz-step
|
||||
[nzStatus]="i?.resourceStatus !== '1' ? 'finish' : 'process'"
|
||||
nzIcon="solution"
|
||||
[nzDescription]="i?.createAt"
|
||||
nzTitle="下单"
|
||||
></nz-step>
|
||||
<nz-step
|
||||
*ngIf="i?.resourceStatus === '1' || i?.resourceStatus === '2'"
|
||||
[nzStatus]="i?.resourceStatus === '1' ? 'wait' : 'finish'"
|
||||
nzIcon="file-done"
|
||||
[nzTitle]="i?.resourceStatus === '2' ? '已完结' : '完结'"
|
||||
></nz-step>
|
||||
<nz-step nzStatus="finish" nzIcon="close-circle" nzTitle="取消货源" *ngIf="i?.resourceStatus === '3'"></nz-step>
|
||||
<nz-step [nzStatus]="i?.resourceStatus !== '1' ? 'finish' : 'process'" nzIcon="solution"
|
||||
[nzDescription]="i?.createAt" nzTitle="下单" [nzSubtitle]="i?.createTime"></nz-step>
|
||||
<nz-step *ngIf="i?.resourceStatus === '1' || i?.resourceStatus === '2'"
|
||||
[nzStatus]="i?.resourceStatus === '1' ? 'wait' : 'finish'" nzIcon="file-done"
|
||||
[nzTitle]="i?.resourceStatus === '2' ? '已完结' : '完结'" [nzSubtitle]="i?.endTime"></nz-step>
|
||||
|
||||
<nz-step nzStatus="finish" nzIcon="close-circle" nzTitle="取消货源" *ngIf="i?.resourceStatus === '3'"
|
||||
[nzSubtitle]="i?.endTime"></nz-step>
|
||||
</nz-steps>
|
||||
</div>
|
||||
</div>
|
||||
@ -77,10 +73,8 @@
|
||||
</ng-container>
|
||||
</sv-container>
|
||||
<div class="mt-md">
|
||||
<h4 class="text-md"
|
||||
>装货卸货信息
|
||||
<span class="ml-sm text-sm"
|
||||
>(
|
||||
<h4 class="text-md">装货卸货信息
|
||||
<span class="ml-sm text-sm">(
|
||||
<label>{{ i?.loadingCount || '一' }}装</label>
|
||||
<label>{{ i?.unloadingCount || '一' }}卸</label>
|
||||
)
|
||||
@ -130,7 +124,8 @@
|
||||
<nz-divider class="mb-xs mt-xs"></nz-divider>
|
||||
<div class="text-right">
|
||||
<label>单价:</label>
|
||||
<span class="text-error-dark text-xxl">{{ item?.freightPrice | currency: '¥' }} {{ freightType[item?.freightType] }}</span>
|
||||
<span class="text-error-dark text-xxl">{{ item?.freightPrice | currency: '¥' }} {{
|
||||
freightType[item?.freightType] }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -139,8 +134,7 @@
|
||||
<nz-card nzTitle="关联运单">
|
||||
<sv-container col="5">
|
||||
<sv [label]="item?.wayBillStatusLabel" *ngFor="let item of i?.wayBillClassifiedStatisticsVOList">
|
||||
(<span [ngClass]="{ 'text-primary': item?.count > 0 }">{{ item?.count }}</span
|
||||
>)
|
||||
(<span [ngClass]="{ 'text-primary': item?.count > 0 }">{{ item?.count }}</span>)
|
||||
</sv>
|
||||
<!-- <sv label="运输中">
|
||||
(<span [ngClass]="{ 'text-primary': i?.id > 0 }">{{ i?.id }}</span>)
|
||||
@ -176,14 +170,10 @@
|
||||
</sv-container>
|
||||
</nz-card>
|
||||
<nz-card nzTitle="操作日志">
|
||||
<st
|
||||
#st
|
||||
[data]="service.$api_getOperationLogRecordsList"
|
||||
[columns]="logColumns"
|
||||
<st #st [data]="service.$api_getOperationLogRecordsList" [columns]="logColumns"
|
||||
[page]="{ show: false, showSize: false }"
|
||||
[req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' }, params: reqParams }"
|
||||
[res]="{ reName: { list: 'data.records', total: 'data.total' } }"
|
||||
>
|
||||
[res]="{ reName: { list: 'data.records', total: 'data.total' } }">
|
||||
</st>
|
||||
</nz-card>
|
||||
</div>
|
||||
|
||||
@ -20,7 +20,7 @@ export class SupplyManagementBulkDetailComponent implements OnInit {
|
||||
logColumns: STColumn[] = [
|
||||
{ title: '内容', index: 'operationContent' },
|
||||
{ title: '操作人', index: 'operator' },
|
||||
{ title: '操作时间', index: ' operatorTimestamp' },
|
||||
{ title: '操作时间', index: 'operatorTimestamp' },
|
||||
];
|
||||
driverColums: STColumn[] = [
|
||||
{ title: '司机姓名', index: 'theme' },
|
||||
|
||||
@ -20,7 +20,7 @@
|
||||
<div nz-col [nzSpan]="10">
|
||||
<div *ngFor="let data1 of startInfo; let idx = index">
|
||||
<nz-form-item>
|
||||
<nz-form-label [nzSpan]="3" nzRequired>装货地</nz-form-label>
|
||||
<nz-form-label nzRequired>装货地</nz-form-label>
|
||||
<nz-form-control [nzErrorTip]="'请输入装货地'">
|
||||
<div class="align-center">
|
||||
<nz-input-group [nzSuffix]="endInconTemp1">
|
||||
@ -30,13 +30,14 @@
|
||||
(click)="openMap('start', idx)"
|
||||
formControlName="loadAddress{{ idx }}"
|
||||
placeholder="请输入装货地"
|
||||
readonly="true"
|
||||
/>
|
||||
</nz-input-group>
|
||||
</div>
|
||||
</nz-form-control>
|
||||
</nz-form-item>
|
||||
<nz-form-item>
|
||||
<nz-form-label [nzSpan]="3" nzRequired>联系人</nz-form-label>
|
||||
<nz-form-label nzRequired>联系人</nz-form-label>
|
||||
<div style="display: flex ;width: 86%">
|
||||
<nz-form-control [nzErrorTip]="'请输入联系人姓名'">
|
||||
<input
|
||||
@ -70,7 +71,7 @@
|
||||
<div nz-col [nzSpan]="10">
|
||||
<div *ngFor="let data2 of endInfo; let idx = index">
|
||||
<nz-form-item>
|
||||
<nz-form-label [nzSpan]="3" nzRequired>卸货地</nz-form-label>
|
||||
<nz-form-label nzRequired>卸货地</nz-form-label>
|
||||
<nz-form-control [nzErrorTip]="'请输入卸货地'">
|
||||
<div class="align-center">
|
||||
<nz-input-group [nzSuffix]="endInconTemp1">
|
||||
@ -80,13 +81,14 @@
|
||||
(click)="openMap('end', idx)"
|
||||
formControlName="unloadAddress{{ idx }}"
|
||||
placeholder="请输入卸货地"
|
||||
readonly="true"
|
||||
/>
|
||||
</nz-input-group>
|
||||
</div>
|
||||
</nz-form-control>
|
||||
</nz-form-item>
|
||||
<nz-form-item>
|
||||
<nz-form-label [nzSpan]="3" nzRequired>联系人</nz-form-label>
|
||||
<nz-form-label nzRequired>联系人</nz-form-label>
|
||||
<div style="display: flex;width: 86%">
|
||||
<nz-form-control [nzErrorTip]="'请输入联系人姓名'">
|
||||
<input
|
||||
@ -124,7 +126,6 @@
|
||||
<sf #sf4 [schema]="schema4" [formData]="sf4data" [button]="'none'" [ui]="ui4">
|
||||
<ng-template sf-template="freightPrice" let-i let-ui="ui">
|
||||
<nz-input-group [nzAddOnAfter]="addOnAfterTemplate">
|
||||
<!-- <input nz-input [ngModel]="i.value" (ngModelChange)="i.setValue($event)" placeholder="请输入" /> -->
|
||||
<nz-input-number [ngModel]="i.value" (ngModelChange)="i.setValue($event)" [nzMin]="1" style="width: 100%"></nz-input-number>
|
||||
</nz-input-group>
|
||||
<ng-template #addOnAfterTemplate>
|
||||
@ -199,7 +200,7 @@
|
||||
<ng-template sf-template="paymentDays" let-i let-ui="ui">
|
||||
<div nz-row>
|
||||
<div class="align-center" >
|
||||
<div nz-col nzSpan="16">
|
||||
<div nz-col nzSpan="12">
|
||||
<nz-input-number
|
||||
[(ngModel)]="i.value"
|
||||
(ngModelChange)="i.setValue($event)"
|
||||
@ -208,7 +209,7 @@
|
||||
[nzStep]="1"
|
||||
></nz-input-number>
|
||||
</div>
|
||||
<div nz-col nzSpan="8">
|
||||
<div nz-col nzSpan="12">
|
||||
<span> 天内支付运费</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -46,6 +46,13 @@ export class SupplyManagementBulkPublishComponent implements OnInit {
|
||||
startInfo: any = [];
|
||||
endInfo: any = [];
|
||||
PageStatus = '';
|
||||
limitValues = {
|
||||
maxMonth: 99,
|
||||
maxWeight: 99999,
|
||||
maxVolume: 99999,
|
||||
maxTrainNumber: 99999,
|
||||
maxFreight: 9999999
|
||||
}
|
||||
constructor(
|
||||
private http: _HttpClient,
|
||||
fb: FormBuilder,
|
||||
@ -96,6 +103,7 @@ export class SupplyManagementBulkPublishComponent implements OnInit {
|
||||
this.initSF4();
|
||||
this.initSF6();
|
||||
this.initdata();
|
||||
this.getLimitvalue();
|
||||
}
|
||||
initSF1() {
|
||||
this.schema1 = {
|
||||
@ -110,9 +118,10 @@ export class SupplyManagementBulkPublishComponent implements OnInit {
|
||||
searchDebounceTime: 300,
|
||||
searchLoadingText: '搜索中...',
|
||||
onSearch: (q: any) => {
|
||||
if (!!q) {
|
||||
let str =q.replace(/^\s+|\s+$/g,"");
|
||||
if (str) {
|
||||
return this.service
|
||||
.request(this.service.$api_enterpriceList, { enterpriseName: q })
|
||||
.request(this.service.$api_enterpriceList, { enterpriseName: str })
|
||||
.pipe(map(res => (res as any[]).map(i => ({ label: i.enterpriseName, value: i.id } as SFSchemaEnum))))
|
||||
.toPromise();
|
||||
} else {
|
||||
@ -120,7 +129,10 @@ export class SupplyManagementBulkPublishComponent implements OnInit {
|
||||
}
|
||||
},
|
||||
change: (q: any) => {
|
||||
this.getRegionCode(q);
|
||||
let str =q.replace(/^\s+|\s+$/g,"");
|
||||
if (str) {
|
||||
this.getRegionCode(str);
|
||||
}
|
||||
},
|
||||
} as SFSelectWidgetSchema
|
||||
},
|
||||
@ -146,19 +158,19 @@ export class SupplyManagementBulkPublishComponent implements OnInit {
|
||||
ui: {
|
||||
placeholder: '请输入',
|
||||
format: 'yyyy-MM-dd HH:mm:ss',
|
||||
disabledDate: (current: Date): boolean => {
|
||||
validator: (val) => {
|
||||
let d = new Date();
|
||||
let year = d.getFullYear();
|
||||
let month = d.getMonth();
|
||||
let date = d.getDate();
|
||||
let mydate = new Date(year, month + 3, date);
|
||||
return differenceInCalendarDays(current, new Date()) < 0 || differenceInCalendarDays(current, mydate) > 0;
|
||||
},
|
||||
validator: (val) => {
|
||||
if( new Date(val) <new Date()){
|
||||
return [{ keyword: 'validTime', message: '有效期时间需大于当前时间' }];
|
||||
}
|
||||
return [];
|
||||
let mydate = new Date(year, month + this.limitValues.maxMonth, date);
|
||||
if (new Date(val) < new Date()) {
|
||||
return [{ keyword: 'validTime', message: '有效期时间需大于当前时间' }];
|
||||
}
|
||||
if (new Date(val) > mydate) {
|
||||
return [{ keyword: 'validTime2', message: `有效期最长为${this.limitValues.maxMonth}个月` }];
|
||||
}
|
||||
return [];
|
||||
},
|
||||
}
|
||||
},
|
||||
@ -412,6 +424,7 @@ export class SupplyManagementBulkPublishComponent implements OnInit {
|
||||
grid: { lg: 8, md: 12, sm: 12, xs: 24 }
|
||||
},
|
||||
$carModel: {
|
||||
spanLabelFixed: 120,
|
||||
grid: { span: 8 }
|
||||
},
|
||||
$carLength: {
|
||||
@ -522,7 +535,7 @@ export class SupplyManagementBulkPublishComponent implements OnInit {
|
||||
} as SFTextareaWidgetSchema
|
||||
}
|
||||
},
|
||||
required: ['stateReceipt', 'receiptType', 'receiptUserName','receiptUserPhone','receiptAddressArea','receiptAddress']
|
||||
required: ['stateReceipt', 'receiptType', 'receiptUserName','receiptUserPhone','receiptAddressArea','receiptAddress','paymentDays']
|
||||
};
|
||||
this.ui7 = {
|
||||
'*': {
|
||||
@ -644,7 +657,6 @@ export class SupplyManagementBulkPublishComponent implements OnInit {
|
||||
}
|
||||
// 提交前确认,委托运输协议弹窗
|
||||
submitConfirm(submitType?: any) {
|
||||
// 校验规则
|
||||
Object.keys(this.validateForm1.controls).forEach(key => {
|
||||
this.validateForm1.controls[key].markAsDirty();
|
||||
this.validateForm1.controls[key].updateValueAndValidity();
|
||||
@ -652,8 +664,18 @@ export class SupplyManagementBulkPublishComponent implements OnInit {
|
||||
this.sf1.validator({ emitError: true });
|
||||
this.sf3.validator({ emitError: true });
|
||||
this.sf4.validator({ emitError: true });
|
||||
this.sf7.validator({ emitError: true });
|
||||
if (this.validateForm1.invalid || !this.sf3.valid || !this.sf1.valid || !this.sf4.valid || !this.sf7.valid) {
|
||||
if (this.validateForm1.invalid || !this.sf1.valid || !this.sf3.valid || !this.sf4.valid ) {
|
||||
this.service.msgSrv.warning('请完善必填项!');
|
||||
return;
|
||||
}
|
||||
// 校验各个输入限定值
|
||||
if (this.sf4.value.weight > this.limitValues.maxWeight || this.sf4.value.volume > this.limitValues.maxVolume || this.sf4.value.number > this.limitValues.maxTrainNumber) {
|
||||
this.service.msgSrv.error(`当前货物核载信息已超出限定值【${this.limitValues.maxWeight}吨、${this.limitValues.maxVolume}方、${this.limitValues.maxTrainNumber}车】`);
|
||||
return;
|
||||
}
|
||||
|
||||
if (this.sf4.value.freightPrice > this.limitValues.maxFreight) {
|
||||
this.service.msgSrv.error(`当前运费单价已超出限定值【${this.limitValues.maxFreight}元】`);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -671,16 +693,21 @@ export class SupplyManagementBulkPublishComponent implements OnInit {
|
||||
}
|
||||
// 确认提交
|
||||
submit(submitType?: string): void {
|
||||
if (typeof this.validateForm1.value.modifyTime !== 'string') {
|
||||
var c = new Date(this.validateForm1.value.modifyTime);
|
||||
this.validateForm1.value.modifyTime =
|
||||
c.getFullYear() + '-' + (c.getMonth() + 1) + '-' + c.getDate() + ' ' + c.getHours() + ':' + c.getMinutes() + ':' + c.getSeconds();
|
||||
}
|
||||
if (typeof this.validateForm1.value.createTime !== 'string') {
|
||||
var c = new Date(this.validateForm1.value.createTime);
|
||||
this.validateForm1.value.createTime =
|
||||
c.getFullYear() + '-' + (c.getMonth() + 1) + '-' + c.getDate() + ' ' + c.getHours() + ':' + c.getMinutes() + ':' + c.getSeconds();
|
||||
}
|
||||
// //装卸货信息
|
||||
const LoadingList = this.startInfo.concat(this.endInfo);
|
||||
|
||||
// 货物信息
|
||||
const sf3Values = { ...this.sf3.value };
|
||||
if (sf3Values.goodsTypeName === '其它') {
|
||||
sf3Values.goodsName = sf3Values.goodsName1;
|
||||
delete sf3Values.goodsName1;
|
||||
}
|
||||
if (this.sf4.value.carModel.includes('999')) {
|
||||
this.sf4.value.carModel = ['999']
|
||||
}
|
||||
if (this.sf4.value.carLength.includes('999')) {
|
||||
this.sf4.value.carLength = ['999']
|
||||
}
|
||||
|
||||
const params: any = {
|
||||
...this.sf1.value,
|
||||
@ -1051,4 +1078,27 @@ export class SupplyManagementBulkPublishComponent implements OnInit {
|
||||
});
|
||||
}
|
||||
}
|
||||
getLimitvalue() {
|
||||
const getlimitvaluesParms = [
|
||||
this.service.limitKeys2.month,
|
||||
this.service.limitKeys2.weight,
|
||||
this.service.limitKeys2.volume,
|
||||
this.service.limitKeys2.trainNumber,
|
||||
this.service.limitKeys2.freight,
|
||||
];
|
||||
this.service.request(this.service.$api_findItemValueByItemKeys, getlimitvaluesParms).subscribe((res) => {
|
||||
const maxMonth = res.filter((item: any) => item.itemKey === this.service.limitKeys2.month)[0].itemValue;
|
||||
const maxWeight = res.filter((item: any) => item.itemKey === this.service.limitKeys2.weight)[0].itemValue;
|
||||
const maxVolume = res.filter((item: any) => item.itemKey === this.service.limitKeys2.volume)[0].itemValue;
|
||||
const maxTrainNumber = res.filter((item: any) => item.itemKey === this.service.limitKeys2.trainNumber)[0].itemValue;
|
||||
const maxFreight = res.filter((item: any) => item.itemKey === this.service.limitKeys2.freight)[0].itemValue;
|
||||
this.limitValues = {
|
||||
maxMonth: Number(maxMonth),
|
||||
maxWeight: Number(maxWeight),
|
||||
maxVolume: Number(maxVolume),
|
||||
maxTrainNumber: Number(maxTrainNumber),
|
||||
maxFreight: Number(maxFreight)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
@ -17,7 +17,7 @@
|
||||
</nz-card>
|
||||
|
||||
<nz-card>
|
||||
<div class="card-title"
|
||||
<div class="card-title"x
|
||||
>装卸货信息<span class="tip-font">预计公里数:{{ totalDistance }}km,预计行程耗时:{{ totalTime }}小时</span></div
|
||||
>
|
||||
|
||||
@ -26,7 +26,7 @@
|
||||
<div nz-col [nzSpan]="10">
|
||||
<div *ngFor="let data1 of startInfo; let idx = index">
|
||||
<nz-form-item>
|
||||
<nz-form-label [nzSpan]="3" nzRequired>装货地</nz-form-label>
|
||||
<nz-form-label nzRequired>装货地</nz-form-label>
|
||||
<nz-form-control [nzErrorTip]="'请输入装货地'">
|
||||
<div class="align-center">
|
||||
<nz-input-group [nzSuffix]="endInconTemp1">
|
||||
@ -37,13 +37,14 @@
|
||||
name="startDetailedAddress{{ idx }}"
|
||||
placeholder="请输入装货地"
|
||||
required
|
||||
readonly="true"
|
||||
/>
|
||||
</nz-input-group>
|
||||
</div>
|
||||
</nz-form-control>
|
||||
</nz-form-item>
|
||||
<nz-form-item>
|
||||
<nz-form-label [nzSpan]="3" nzRequired>联系人</nz-form-label>
|
||||
<nz-form-item >
|
||||
<nz-form-label nzRequired>联系人</nz-form-label>
|
||||
<div style="display: flex;width: 86%">
|
||||
<nz-form-control [nzErrorTip]="'请输入联系人姓名'">
|
||||
<input
|
||||
@ -79,7 +80,7 @@
|
||||
<div nz-col [nzSpan]="10">
|
||||
<div *ngFor="let data2 of endInfo; let idx = index">
|
||||
<nz-form-item>
|
||||
<nz-form-label [nzSpan]="3" nzRequired>卸货地</nz-form-label>
|
||||
<nz-form-label nzRequired>卸货地</nz-form-label>
|
||||
<nz-form-control [nzErrorTip]="'请输入卸货地'">
|
||||
<div class="align-center">
|
||||
<nz-input-group [nzSuffix]="endInconTemp1">
|
||||
@ -90,13 +91,14 @@
|
||||
name="endDetailedAddress{{ idx }}"
|
||||
placeholder="请输入卸货地"
|
||||
required
|
||||
readonly="true"
|
||||
/>
|
||||
</nz-input-group>
|
||||
</div>
|
||||
</nz-form-control>
|
||||
</nz-form-item>
|
||||
<nz-form-item>
|
||||
<nz-form-label [nzSpan]="3" nzRequired>联系人</nz-form-label>
|
||||
<nz-form-label nzRequired>联系人</nz-form-label>
|
||||
<div style="display: flex;width: 86%">
|
||||
<nz-form-control [nzErrorTip]="'请输入联系人姓名'">
|
||||
<input
|
||||
@ -217,7 +219,7 @@
|
||||
<ng-template sf-template="paymentDays" let-i let-ui="ui">
|
||||
<div nz-row>
|
||||
<div class="align-center" >
|
||||
<div nz-col nzSpan="16">
|
||||
<div nz-col nzSpan="12">
|
||||
<nz-input-number
|
||||
[ngModel]="i.value"
|
||||
[nzMin]="1"
|
||||
@ -227,7 +229,7 @@
|
||||
nzPlaceHolder="请输入1-30"
|
||||
></nz-input-number>
|
||||
</div>
|
||||
<div nz-col nzSpan="8">
|
||||
<div nz-col nzSpan="12">
|
||||
<span> 天内支付运费</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
width: 100%;
|
||||
}
|
||||
nz-date-picker {
|
||||
width: 100%;
|
||||
width: 94.3%;
|
||||
}
|
||||
}
|
||||
i {
|
||||
@ -37,10 +37,6 @@
|
||||
:hover{color: #52acff;}
|
||||
}
|
||||
|
||||
#container {
|
||||
width: 300px;
|
||||
height: 180px;
|
||||
}
|
||||
|
||||
input[type='number'] {
|
||||
-moz-appearance: textfield;
|
||||
|
||||
@ -41,6 +41,13 @@ export class SupplyManagementBulkReleasePublishComponent implements OnInit {
|
||||
totalFees: any; // 总数信息
|
||||
id = '';
|
||||
type = 'add';
|
||||
limitValues = {
|
||||
maxMonth: 99,
|
||||
maxWeight: 99999,
|
||||
maxVolume: 99999,
|
||||
maxTrainNumber: 99999,
|
||||
maxFreight: 9999999
|
||||
}
|
||||
// // 单位
|
||||
startInfo: any[] = [];
|
||||
endInfo: any[] = [];
|
||||
@ -80,6 +87,7 @@ export class SupplyManagementBulkReleasePublishComponent implements OnInit {
|
||||
this.initSF3();
|
||||
this.initSF4();
|
||||
this.initSF6();
|
||||
this.getLimitvalue();
|
||||
this.startInfo = [
|
||||
{
|
||||
detailedAddress: '',
|
||||
@ -121,9 +129,10 @@ export class SupplyManagementBulkReleasePublishComponent implements OnInit {
|
||||
searchLoadingText: '搜索中...',
|
||||
allowClear: true,
|
||||
onSearch: (q: any) => {
|
||||
if (!!q) {
|
||||
let str =q.replace(/^\s+|\s+$/g,"");
|
||||
if (str) {
|
||||
return this.service
|
||||
.request(this.service.$api_enterpriceList, { enterpriseName: q })
|
||||
.request(this.service.$api_enterpriceList, { enterpriseName: str })
|
||||
.pipe(map((res: any[]) => (res as any[]).map(i => ({ label: i.enterpriseName, value: i.id } as SFSchemaEnum))))
|
||||
.toPromise();
|
||||
} else {
|
||||
@ -131,7 +140,10 @@ export class SupplyManagementBulkReleasePublishComponent implements OnInit {
|
||||
}
|
||||
},
|
||||
change: (q: any) => {
|
||||
this.getRegionCode(q);
|
||||
let str =q.replace(/^\s+|\s+$/g,"");
|
||||
if (str) {
|
||||
this.getRegionCode(str);
|
||||
}
|
||||
}
|
||||
} as SFSelectWidgetSchema
|
||||
},
|
||||
@ -169,19 +181,19 @@ export class SupplyManagementBulkReleasePublishComponent implements OnInit {
|
||||
ui: {
|
||||
placeholder: '请输入',
|
||||
format: 'yyyy-MM-dd HH:mm:ss',
|
||||
disabledDate: (current: Date): boolean => {
|
||||
validator: (val) => {
|
||||
let d = new Date();
|
||||
let year = d.getFullYear();
|
||||
let month = d.getMonth();
|
||||
let date = d.getDate();
|
||||
let mydate = new Date(year, month + 3, date);
|
||||
return differenceInCalendarDays(current, new Date()) < 0 || differenceInCalendarDays(current, mydate) > 0;
|
||||
},
|
||||
validator: (val) => {
|
||||
if( new Date(val) <new Date()){
|
||||
return [{ keyword: 'validTime', message: '有效期时间需大于当前时间' }];
|
||||
}
|
||||
return [];
|
||||
let mydate = new Date(year, month + this.limitValues.maxMonth, date);
|
||||
if (new Date(val) < new Date()) {
|
||||
return [{ keyword: 'validTime', message: '有效期时间需大于当前时间' }];
|
||||
}
|
||||
if (new Date(val) > mydate) {
|
||||
return [{ keyword: 'validTime2', message: `有效期最长为${this.limitValues.maxMonth}个月` }];
|
||||
}
|
||||
return [];
|
||||
},
|
||||
}
|
||||
},
|
||||
@ -435,6 +447,7 @@ export class SupplyManagementBulkReleasePublishComponent implements OnInit {
|
||||
grid: { lg: 8, md: 12, sm: 12, xs: 24 }
|
||||
},
|
||||
$carModel: {
|
||||
spanLabelFixed: 120,
|
||||
grid: { span: 8 }
|
||||
},
|
||||
$carLength: {
|
||||
@ -532,7 +545,7 @@ export class SupplyManagementBulkReleasePublishComponent implements OnInit {
|
||||
} as SFTextareaWidgetSchema
|
||||
}
|
||||
},
|
||||
required: ['stateReceipt', 'paymentDays', 'receiptType', 'receiptUserName','receiptUserPhone','receiptAddressArea','receiptAddress']
|
||||
required: ['stateReceipt', 'paymentDays', 'receiptType', 'receiptUserName','receiptUserPhone','receiptAddressArea','receiptAddress','paymentDays']
|
||||
};
|
||||
this.ui6 = {
|
||||
'*': {
|
||||
@ -580,9 +593,19 @@ export class SupplyManagementBulkReleasePublishComponent implements OnInit {
|
||||
this.sf4.validator({ emitError: true });
|
||||
this.sf6.validator({ emitError: true });
|
||||
if (this.ngForm.form.invalid || !this.sf1.valid || !this.sf3.valid || !this.sf4.valid || !this.sf6.valid) {
|
||||
this.service.msgSrv.warning('请完善必填项!');
|
||||
return;
|
||||
}
|
||||
|
||||
// 校验各个输入限定值
|
||||
if (this.sf4.value.weight > this.limitValues.maxWeight || this.sf4.value.volume > this.limitValues.maxVolume || this.sf4.value.number > this.limitValues.maxTrainNumber) {
|
||||
this.service.msgSrv.error(`当前货物核载信息已超出限定值【${this.limitValues.maxWeight}吨、${this.limitValues.maxVolume}方、${this.limitValues.maxTrainNumber}车】`);
|
||||
return;
|
||||
}
|
||||
|
||||
if (this.sf4.value.freightPrice > this.limitValues.maxFreight) {
|
||||
this.service.msgSrv.error(`当前运费单价已超出限定值【${this.limitValues.maxFreight}元】`);
|
||||
return;
|
||||
}
|
||||
const modalRef = this.modalService.create({
|
||||
nzTitle: '运输协议',
|
||||
nzContent: TranAgreementComponent,
|
||||
@ -599,12 +622,20 @@ export class SupplyManagementBulkReleasePublishComponent implements OnInit {
|
||||
submit(submitType: string): void {
|
||||
// //装卸货信息
|
||||
const LoadingList = this.startInfo.concat(this.endInfo);
|
||||
|
||||
// 货物信息
|
||||
const sf3Values = { ...this.sf3.value };
|
||||
if (sf3Values.goodsTypeName === '其它') {
|
||||
sf3Values.goodsName = sf3Values.goodsName1;
|
||||
delete sf3Values.goodsName1;
|
||||
}
|
||||
if (this.sf4.value.carModel.includes('999')) {
|
||||
this.sf4.value.carModel = ['999']
|
||||
}
|
||||
if (this.sf4.value.carLength.includes('999')) {
|
||||
this.sf4.value.carLength = ['999']
|
||||
}
|
||||
|
||||
const goodsInfoList = [
|
||||
{
|
||||
...sf3Values,
|
||||
@ -816,4 +847,27 @@ export class SupplyManagementBulkReleasePublishComponent implements OnInit {
|
||||
});
|
||||
}
|
||||
}
|
||||
getLimitvalue() {
|
||||
const getlimitvaluesParms = [
|
||||
this.service.limitKeys2.month,
|
||||
this.service.limitKeys2.weight,
|
||||
this.service.limitKeys2.volume,
|
||||
this.service.limitKeys2.trainNumber,
|
||||
this.service.limitKeys2.freight,
|
||||
];
|
||||
this.service.request(this.service.$api_findItemValueByItemKeys, getlimitvaluesParms).subscribe((res) => {
|
||||
const maxMonth = res.filter((item: any) => item.itemKey === this.service.limitKeys2.month)[0].itemValue;
|
||||
const maxWeight = res.filter((item: any) => item.itemKey === this.service.limitKeys2.weight)[0].itemValue;
|
||||
const maxVolume = res.filter((item: any) => item.itemKey === this.service.limitKeys2.volume)[0].itemValue;
|
||||
const maxTrainNumber = res.filter((item: any) => item.itemKey === this.service.limitKeys2.trainNumber)[0].itemValue;
|
||||
const maxFreight = res.filter((item: any) => item.itemKey === this.service.limitKeys2.freight)[0].itemValue;
|
||||
this.limitValues = {
|
||||
maxMonth: Number(maxMonth),
|
||||
maxWeight: Number(maxWeight),
|
||||
maxVolume: Number(maxVolume),
|
||||
maxTrainNumber: Number(maxTrainNumber),
|
||||
maxFreight: Number(maxFreight)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
* @Author : Shiming
|
||||
* @Date : 2022-01-12 10:52:50
|
||||
* @LastEditors : Shiming
|
||||
* @LastEditTime : 2022-02-25 15:22:19
|
||||
* @LastEditTime : 2022-03-02 18:09:01
|
||||
* @FilePath : \\tms-obc-web\\src\\app\\routes\\supply-management\\components\\bulk\\bulk.component.html
|
||||
* Copyright (C) 2022 huzhenhong. All rights reserved.
|
||||
-->
|
||||
@ -32,8 +32,8 @@
|
||||
</div>
|
||||
<div nz-col [nzSpan]="_$expand ? 24 : 6" class="text-right">
|
||||
<button nz-button nzType="primary" [nzLoading]="loading" (click)="search()" acl [acl-ability]="['SUPPLY-INDEX-bulkSearch']">查询</button>
|
||||
<button nz-button nzType="primary" [nzLoading]="loading">导入</button>
|
||||
<button nz-button [nzLoading]="loading" (click)="resetSF()">重置</button>
|
||||
<button nz-button nzType="primary" [disabled]="loading">导入</button>
|
||||
<button nz-button [disabled]="loading" (click)="resetSF()">重置</button>
|
||||
<button nz-button nzType="link" (click)="expandToggle()">
|
||||
{{ !_$expand ? '展开' : '收起' }}
|
||||
<i nz-icon [nzType]="!_$expand ? 'down' : 'up'"></i>
|
||||
@ -52,7 +52,7 @@
|
||||
<nz-tabset (nzSelectedIndexChange)="selectChange($event)" [nzTabBarExtraContent]="extraTemplate">
|
||||
<nz-tab [nzTitle]="'全部(' + tabs?.totalQuantity + ')'"></nz-tab>
|
||||
<nz-tab [nzTitle]="'进行中(' + tabs?.stayQuantity + ')'"></nz-tab>
|
||||
<nz-tab [nzTitle]="'已完结(' + tabs?.receivedQuantity + ')'"></nz-tab>
|
||||
<nz-tab [nzTitle]="'已完结(' + tabs?.completedQuantity + ')'"></nz-tab>
|
||||
<nz-tab [nzTitle]="'已取消(' + tabs?.cancelQuantity + ')'"></nz-tab>
|
||||
</nz-tabset>
|
||||
<div style="position: relative">
|
||||
@ -75,6 +75,9 @@
|
||||
[page]="{ show: true, showSize: true, pageSizes: [10, 20, 30, 50, 100, 200, 300, 500, 1000] }"
|
||||
[loading]="loading"
|
||||
>
|
||||
<ng-template st-row="createUserName" let-item let-index="index">
|
||||
<div> {{ item?.createUserName }}/{{ item?.createUserPhone }} </div>
|
||||
</ng-template>
|
||||
<!--运费单价 -->
|
||||
<ng-template st-row="freightPrice" let-item let-index="index">
|
||||
<div class="mr-xs">{{ item?.freightPrice | currency }} </div>
|
||||
|
||||
@ -36,7 +36,7 @@ export class SupplyManagementBulkComponent implements OnInit {
|
||||
tabs = {
|
||||
totalQuantity: 0,
|
||||
cancelQuantity: 0,
|
||||
receivedQuantity: 0,
|
||||
completedQuantity: 0,
|
||||
stayQuantity: 0
|
||||
};
|
||||
constructor(
|
||||
@ -209,10 +209,10 @@ export class SupplyManagementBulkComponent implements OnInit {
|
||||
},
|
||||
allowClear: true,
|
||||
onSearch: (q: any) => {
|
||||
console.log(q)
|
||||
if (!!q) {
|
||||
let str =q.replace(/^\s+|\s+$/g,"");
|
||||
if (str) {
|
||||
return this.service
|
||||
.request(this.service.$api_enterpriceList, { enterpriseName: q})
|
||||
.request(this.service.$api_enterpriceList, { enterpriseName: str})
|
||||
.pipe(map((res: any) => (res as any[]).map((i) => ({ label: i.enterpriseName, value: i.id } as SFSchemaEnum))))
|
||||
.toPromise();
|
||||
} else {
|
||||
@ -255,6 +255,7 @@ export class SupplyManagementBulkComponent implements OnInit {
|
||||
className: 'text-left',
|
||||
render: 'resourceCode'
|
||||
},
|
||||
{ title: '录单员', render: 'createUserName', width: '200px', className: 'text-left' },
|
||||
{ title: '货主', index: 'shipperAppUserName', width: '220px', className: 'text-left' },
|
||||
{ title: '项目名称', index: 'enterpriseProjectName', width: '220px', className: 'text-left' },
|
||||
{ title: '关联订单', render: 'orderSn', width: '200px', className: 'text-left' },
|
||||
@ -392,7 +393,11 @@ export class SupplyManagementBulkComponent implements OnInit {
|
||||
|
||||
selectChange(e: number) {
|
||||
console.log(e);
|
||||
if(e == 2) {
|
||||
this.resourceStatus = 4;
|
||||
} else {
|
||||
this.resourceStatus = e;
|
||||
}
|
||||
this.initST();
|
||||
setTimeout(() => {
|
||||
this.st.load(1);
|
||||
@ -406,7 +411,7 @@ export class SupplyManagementBulkComponent implements OnInit {
|
||||
assignedQrcode(item: any) {
|
||||
const modalRef = this.modal.create({
|
||||
nzTitle: '二维码',
|
||||
nzWidth: '600px',
|
||||
nzWidth: '468px',
|
||||
nzContent: SupplyManagementQrcodePageComponent,
|
||||
nzComponentParams: {
|
||||
i: item,
|
||||
@ -458,7 +463,7 @@ export class SupplyManagementBulkComponent implements OnInit {
|
||||
* 审核通过按钮
|
||||
*/
|
||||
handleOK(value: any) {
|
||||
if(this.selectedRows.length <= 0) {
|
||||
if(this.auditMany === false) {
|
||||
const params: any = {
|
||||
id: this.auditID,
|
||||
remarks: this.sfFre.value.remarks,
|
||||
@ -552,7 +557,7 @@ export class SupplyManagementBulkComponent implements OnInit {
|
||||
this.tabs = {
|
||||
totalQuantity: 0,
|
||||
cancelQuantity: 0,
|
||||
receivedQuantity: 0,
|
||||
completedQuantity: 0,
|
||||
stayQuantity: 0
|
||||
};
|
||||
const params: any = Object.assign({}, this.reqParams || {});
|
||||
|
||||
@ -4,48 +4,35 @@
|
||||
* @Author : Shiming
|
||||
* @Date : 2022-01-12 10:52:50
|
||||
* @LastEditors : Shiming
|
||||
* @LastEditTime : 2022-01-18 17:27:53
|
||||
* @LastEditTime : 2022-03-02 14:27:20
|
||||
* @FilePath : \\tms-obc-web\\src\\app\\routes\\supply-management\\components\\choose-famifiar\\choose-famifiar.component.html
|
||||
* Copyright (C) 2022 huzhenhong. All rights reserved.
|
||||
-->
|
||||
|
||||
<button nz-button nzType="primary" style="margin-bottom: 24px" (click)="add()"><i nz-icon nzType="plus"></i>添加司机</button>
|
||||
<!-- <button nz-button nzType="primary" style="margin-bottom: 24px" (click)="add()"><i nz-icon nzType="plus"></i>添加司机</button> -->
|
||||
<!-- 搜索区 -->
|
||||
<div nz-row nzGutter="8">
|
||||
<div nz-col [nzSpan]="12">
|
||||
<div nz-row nzGutter="8">
|
||||
<div nz-col [nzSpan]="18">
|
||||
<sf #sf [ui]="ui" [schema]="schema" [button]="'none'"></sf>
|
||||
</div>
|
||||
<div nz-col [nzSpan]="6">
|
||||
<button nz-button nzType="primary" [nzLoading]="service.http.loading" (click)="st.load(1)">查询</button>
|
||||
<button nz-button (click)="resetSF()">重置</button>
|
||||
</div>
|
||||
</div>
|
||||
<div nz-col [nzSpan]="18">
|
||||
<sf #sf [ui]="ui" [schema]="schema" [button]="'none'"></sf>
|
||||
</div>
|
||||
<div nz-col [nzSpan]="6">
|
||||
<button nz-button nzType="primary" [nzLoading]="service.http.loading" (click)="st.load(1)">查询</button>
|
||||
<button nz-button (click)="resetSF()">重置</button>
|
||||
</div>
|
||||
</div>
|
||||
<div nz-row nzGutter="8">
|
||||
<div nz-col [nzSpan]="12">
|
||||
<!-- 数据列表 -->
|
||||
<st
|
||||
#st
|
||||
*ngIf="columns"
|
||||
[bordered]="true"
|
||||
[data]="service.$api_getList_card"
|
||||
[columns]="columns"
|
||||
size="small"
|
||||
<st #st [bordered]="true" [data]="service.$api_getListCars" [columns]="columns" size="small"
|
||||
[req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' }, params: reqParams }"
|
||||
[res]="{ reName: { list: 'data.records', total: 'data.total' }, process: reqProcess }"
|
||||
[page]="{ show: true, showSize: true, pageSizes: [10, 20, 30, 50, 100, 200, 300, 500, 1000] }"
|
||||
[loading]="service.http.loading"
|
||||
[widthMode]="{ type: 'strict' }"
|
||||
[scroll]="{ x: '600px' }"
|
||||
style="margin-top: 22px; width: 100%"
|
||||
>
|
||||
[loadingDelay]="500" [loading]="service.http.loading" [widthMode]="{ type: 'strict' }" [scroll]="{ x: '600px' }"
|
||||
style="margin-top: 22px">
|
||||
<ng-template st-row="userCarLicenseDesensitizationVOList" let-item let-index="index">
|
||||
<nz-select [(ngModel)]="item.default" (ngModelChange)="carChange($event, item)" style="width: 100%">
|
||||
<nz-option nzValue="" nzLabel="不限"></nz-option>
|
||||
<nz-option [nzValue]="cart" [nzLabel]="cart.carNo" *ngFor="let cart of item.userCarLicenseDesensitizationVOList"> </nz-option>
|
||||
<nz-option [nzValue]="cart" [nzLabel]="cart.carNo"
|
||||
*ngFor="let cart of item.userCarLicenseDesensitizationVOList"> </nz-option>
|
||||
</nz-select>
|
||||
</ng-template>
|
||||
</st>
|
||||
@ -53,21 +40,18 @@
|
||||
<div nz-col [nzSpan]="12">
|
||||
<!-- 选中列表 -->
|
||||
<div>已选择{{ st2Data.length }}位司机</div>
|
||||
<st
|
||||
#st2
|
||||
*ngIf="columns2"
|
||||
[bordered]="true"
|
||||
[data]="st2Data"
|
||||
[columns]="columns2"
|
||||
size="small"
|
||||
[page]="{ show: false }"
|
||||
[scroll]="{ x: '600px', y: '300px' }"
|
||||
style="width: 100%"
|
||||
>
|
||||
<st #st2 [bordered]="true" [data]="st2Data" [columns]="columns2" size="small"
|
||||
[req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' }, params: reqParams }"
|
||||
[res]="{ reName: { list: 'data.records', total: 'data.total' } }"
|
||||
[page]="{ show: true, showSize: true, pageSizes: [10, 20, 30, 50, 100, 200, 300, 500, 1000] }"
|
||||
[loadingDelay]="500" [loading]="service.http.loading" [widthMode]="{ type: 'strict' }" [scroll]="{ x: '600px' }">
|
||||
<ng-template st-row="captain" let-item let-index="index">
|
||||
<span>{{ item.captainName }} {{ item.captainPhone }}</span>
|
||||
<a (click)="setCaptain(item, index)">设置</a>
|
||||
</ng-template>
|
||||
<ng-template st-row="defaultCar" let-item let-index="index">
|
||||
{{item.default?.carNo}}
|
||||
</ng-template>
|
||||
</st>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -3,7 +3,7 @@ import { ActivatedRoute, Router } from '@angular/router';
|
||||
import { STChange, STColumn, STComponent, STData, STRequestOptions } from '@delon/abc/st';
|
||||
import { SFComponent, SFSchema, SFSelectWidgetSchema, SFUISchema } from '@delon/form';
|
||||
import { ModalHelper } from '@delon/theme';
|
||||
import { processSingleSort } from '@shared';
|
||||
import { EAEnvironmentService, processSingleSort } from '@shared';
|
||||
import { NzDrawerRef, NzDrawerService } from 'ng-zorro-antd/drawer';
|
||||
import { NzModalRef, NzModalService } from 'ng-zorro-antd/modal';
|
||||
import { SupplyManagementAddDriversComponent } from 'src/app/routes/supply-management/components/add-drivers/add-drivers.component';
|
||||
@ -37,7 +37,7 @@ export class PublishGoodsChooseFamifiarComponent implements OnInit {
|
||||
submitUrl = '';
|
||||
|
||||
@Input()
|
||||
submitParams = {};
|
||||
submitParams:any;
|
||||
|
||||
constructor(
|
||||
private modal: NzModalRef,
|
||||
@ -47,8 +47,8 @@ export class PublishGoodsChooseFamifiarComponent implements OnInit {
|
||||
public service: SupplyManagementService,
|
||||
private modalService: NzModalService,
|
||||
private modalHelper: ModalHelper,
|
||||
private cdr: ChangeDetectorRef
|
||||
) {}
|
||||
private envSrv: EAEnvironmentService
|
||||
) { }
|
||||
|
||||
/**
|
||||
* 查询参数
|
||||
@ -61,26 +61,23 @@ export class PublishGoodsChooseFamifiarComponent implements OnInit {
|
||||
}
|
||||
ngOnInit() {
|
||||
this.initSF();
|
||||
|
||||
setTimeout(() => {
|
||||
this.initST();
|
||||
this.initST2();
|
||||
}, 200);
|
||||
this.initST();
|
||||
this.initST2();
|
||||
}
|
||||
|
||||
initSF() {
|
||||
this.schema = {
|
||||
properties: {
|
||||
name: {
|
||||
nameOrPhone: {
|
||||
type: 'string',
|
||||
title: '',
|
||||
title: '承运司机',
|
||||
ui: {
|
||||
placeholder: '请输入司机姓名/手机号'
|
||||
}
|
||||
},
|
||||
name2: {
|
||||
carNo: {
|
||||
type: 'string',
|
||||
title: '',
|
||||
title: '车牌号',
|
||||
ui: {
|
||||
placeholder: '请输入车牌号'
|
||||
}
|
||||
@ -98,13 +95,11 @@ export class PublishGoodsChooseFamifiarComponent implements OnInit {
|
||||
this.columns = [
|
||||
{
|
||||
title: '司机姓名',
|
||||
index: 'name',
|
||||
width: 120
|
||||
index: 'name'
|
||||
},
|
||||
{
|
||||
title: '手机号',
|
||||
index: 'telephone',
|
||||
width: 120
|
||||
index: 'telephone'
|
||||
},
|
||||
{
|
||||
title: '指定车辆',
|
||||
@ -115,7 +110,6 @@ export class PublishGoodsChooseFamifiarComponent implements OnInit {
|
||||
title: '状态',
|
||||
className: 'text-center',
|
||||
index: 'certificationStatus',
|
||||
width: 120,
|
||||
type: 'badge',
|
||||
badge: {
|
||||
'-1': { text: '未提交', color: 'default' },
|
||||
@ -127,12 +121,11 @@ export class PublishGoodsChooseFamifiarComponent implements OnInit {
|
||||
{
|
||||
title: '操作',
|
||||
className: 'text-center',
|
||||
width: 80,
|
||||
buttons: [
|
||||
{
|
||||
text: '选择',
|
||||
iif: item => item.showChoose != false,
|
||||
click: (_record, _modal, _instance) => this.choose(_record),
|
||||
click: (_record, _modal, _instance) => this.verifyVechicleStatus(_record),
|
||||
iifBehavior: 'disabled'
|
||||
}
|
||||
]
|
||||
@ -145,7 +138,7 @@ export class PublishGoodsChooseFamifiarComponent implements OnInit {
|
||||
{
|
||||
title: '司机姓名',
|
||||
index: 'name',
|
||||
width: 120
|
||||
width: '90px'
|
||||
},
|
||||
{
|
||||
title: '手机号',
|
||||
@ -155,17 +148,17 @@ export class PublishGoodsChooseFamifiarComponent implements OnInit {
|
||||
{
|
||||
title: '车队长',
|
||||
render: 'captain',
|
||||
width: '100px'
|
||||
width: '200px'
|
||||
},
|
||||
{
|
||||
title: '指定车辆',
|
||||
index: 'carNo',
|
||||
render: 'defaultCar',
|
||||
width: '130px'
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
className: 'text-center',
|
||||
width: 80,
|
||||
width: '90px',
|
||||
buttons: [
|
||||
{
|
||||
text: '移除',
|
||||
@ -198,6 +191,23 @@ export class PublishGoodsChooseFamifiarComponent implements OnInit {
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 校验司机是否能设置车队长
|
||||
* @param item 当前对象
|
||||
*/
|
||||
verifyCanSetCarCaptain(item: any, index: any) {
|
||||
this.service.request(this.service.$api_get_sys_config, [{ itemKey: 'sys.config.shipper.setCarCaptain', businessId: this.envSrv.env.enterpriseId }]).subscribe(res => {
|
||||
if (res && res.length > 0) {
|
||||
const { itemValue } = res[0];
|
||||
if (itemValue !== '1') {
|
||||
this.service.msgSrv.error('不可设置车队长!');
|
||||
return;
|
||||
}
|
||||
this.setCaptain(item, index);
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
//设置车队长
|
||||
setCaptain(record: STData, index: any) {
|
||||
this.modalHelper
|
||||
@ -260,5 +270,53 @@ export class PublishGoodsChooseFamifiarComponent implements OnInit {
|
||||
});
|
||||
}
|
||||
|
||||
carChange(event: any, item: STData) {}
|
||||
carChange(event: any, item: STData) {
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 验证车辆的状态
|
||||
*/
|
||||
verifyVechicleStatus(_record: STData) {
|
||||
const { carId, appUserId: driverId, captainAppUserId: carCaptainId } = _record;
|
||||
const carInfo: any = { carId, driverId, carCaptainId };
|
||||
const goodsInfoList = this.submitParams?.goodsInfoList;
|
||||
this.service.request(this.service.$api_verify_vehicle_status, { ...carInfo, goodsInfoList }).subscribe((res: any) => {
|
||||
if (res) {
|
||||
const { title, alert, subContent, content } = res;
|
||||
switch (alert) {
|
||||
case 'Error':
|
||||
this.error(title, content, subContent);
|
||||
break;
|
||||
case 'Warn':
|
||||
this.showConfirm(_record, title, content, subContent);
|
||||
break;
|
||||
case 'Success':
|
||||
this.choose(_record);
|
||||
break;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
error(title: string, content: string, subContent: string): void {
|
||||
this.modalService.error({
|
||||
nzTitle: title,
|
||||
nzContent: `<span class="text-error-dark">${content ? content : ''}</span><span class="text-grey-dark">${subContent ? subContent : ''}</span>`,
|
||||
nzOkText: '知道了'
|
||||
});
|
||||
}
|
||||
|
||||
showConfirm(_record: STData, title: string, content: string, subContent: string): void {
|
||||
this.modalService.confirm({
|
||||
nzTitle: title,
|
||||
nzContent: `<span class="text-error-dark">${content ? content : ''}</span><span class="text-grey-dark">${subContent ? subContent : ''}</span>`,
|
||||
nzOkText: '继续',
|
||||
nzCancelText: '取消',
|
||||
nzOnOk: () => {
|
||||
this.choose(_record);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,3 +1,13 @@
|
||||
/*
|
||||
* @Description :
|
||||
* @Version : 1.0
|
||||
* @Author : Shiming
|
||||
* @Date : 2021-12-06 15:17:52
|
||||
* @LastEditors : Shiming
|
||||
* @LastEditTime : 2022-03-02 14:29:12
|
||||
* @FilePath : \\tms-obc-web\\src\\app\\routes\\supply-management\\components\\choose-famifiar\\set-captain\\set-captain.component.ts
|
||||
* Copyright (C) 2022 huzhenhong. All rights reserved.
|
||||
*/
|
||||
import { AfterViewInit, ChangeDetectorRef, Component, OnChanges, OnInit, ViewChild } from '@angular/core';
|
||||
import { ActivatedRoute } from '@angular/router';
|
||||
import { SFComponent, SFSchema, SFSchemaEnumType, SFUISchema } from '@delon/form';
|
||||
@ -16,7 +26,7 @@ export class PublishchooseFamifiarSetCaptainComponent implements OnInit {
|
||||
|
||||
i: any;
|
||||
|
||||
constructor(public http: _HttpClient, private cdr: ChangeDetectorRef, private route: ActivatedRoute) {}
|
||||
constructor(public http: _HttpClient, private cdr: ChangeDetectorRef, private route: ActivatedRoute, private modal: NzModalRef,) {}
|
||||
|
||||
ngOnInit(): void {
|
||||
this.initSF();
|
||||
@ -24,12 +34,11 @@ export class PublishchooseFamifiarSetCaptainComponent implements OnInit {
|
||||
initSF() {
|
||||
this.schema = {
|
||||
properties: {
|
||||
name: {
|
||||
captainPhone: {
|
||||
type: 'string',
|
||||
title: '车队长手机号'
|
||||
}
|
||||
},
|
||||
required: ['name']
|
||||
};
|
||||
this.ui = {
|
||||
'*': {
|
||||
@ -39,6 +48,6 @@ export class PublishchooseFamifiarSetCaptainComponent implements OnInit {
|
||||
};
|
||||
}
|
||||
|
||||
close() {}
|
||||
save() {}
|
||||
close() {this.modal.close()}
|
||||
save() {this.modal.close(this.sf.value.captainPhone)}
|
||||
}
|
||||
|
||||
@ -14,40 +14,41 @@
|
||||
<div class="card-title"
|
||||
>装卸货信息<span class="tip-font">预计公里数:{{ totalDistance }}km,预计行程耗时:{{ totalTime }}小时</span></div
|
||||
>
|
||||
|
||||
<form nz-form [formGroup]="validateForm1" role="form">
|
||||
<div nz-row [nzGutter]="24">
|
||||
<div nz-col [nzSpan]="10">
|
||||
<div *ngFor="let data of startInfo; let idx = index">
|
||||
<div *ngFor="let data1 of startInfo; let idx = index">
|
||||
<nz-form-item>
|
||||
<nz-form-label [nzSpan]="3" nzRequired>装货地</nz-form-label>
|
||||
<nz-form-label nzRequired>装货地</nz-form-label>
|
||||
<nz-form-control [nzErrorTip]="'请输入装货地'">
|
||||
<div class="align-center">
|
||||
<nz-input-group [nzSuffix]="endInconTemp1">
|
||||
<input
|
||||
nz-input
|
||||
[(ngModel)]="data.detailedAddress"
|
||||
[(ngModel)]="data1.detailedAddress"
|
||||
(click)="openMap('start', idx)"
|
||||
formControlName="loadAddress{{ idx }}"
|
||||
placeholder="请输入装货地"
|
||||
readonly="true"
|
||||
/>
|
||||
</nz-input-group>
|
||||
|
||||
<span *ngIf="idx !== 0" [ngClass]="idx == 0 ? 'hides' : ''" style="padding: 0 10px"
|
||||
><i nz-icon nzType="minus-circle" nzTheme="outline" style="color: #d9001b" (click)="subStartInfo($event, idx, data.id)"></i
|
||||
<span *ngIf="idx !== 0" style="padding: 0 10px"
|
||||
><i nz-icon nzType="minus-circle" nzTheme="outline" style="color: #d9001b" (click)="subStartInfo($event, idx)"></i
|
||||
></span>
|
||||
<span *ngIf="idx == 0" style="visibility:hidden;padding: 0 10px"
|
||||
><i nz-icon nzType="minus-circle" nzTheme="outline" style="color: #d9001b" (click)="subStartInfo($event, idx, data.id)"></i
|
||||
></span>
|
||||
><i nz-icon nzType="minus-circle" nzTheme="outline" style="color: #d9001b" (click)="subStartInfo($event, idx)"></i
|
||||
></span>
|
||||
</div>
|
||||
</nz-form-control>
|
||||
</nz-form-item>
|
||||
<nz-form-item>
|
||||
<nz-form-label [nzSpan]="3" nzRequired>联系人</nz-form-label>
|
||||
<nz-form-label nzRequired>联系人</nz-form-label>
|
||||
<div style="display: flex; width: 80.7%">
|
||||
<nz-form-control [nzErrorTip]="'请输入联系人姓名'">
|
||||
<input
|
||||
nz-input
|
||||
[(ngModel)]="data.appUserName"
|
||||
[(ngModel)]="data1.appUserName"
|
||||
formControlName="loadName{{ idx }}"
|
||||
name="loadName{{ idx }}"
|
||||
maxlength="30"
|
||||
@ -58,7 +59,7 @@
|
||||
<input
|
||||
style="margin-left: 12px"
|
||||
nz-input
|
||||
[(ngModel)]="data.contractTelephone"
|
||||
[(ngModel)]="data1.contractTelephone"
|
||||
maxlength="11"
|
||||
formControlName="loadPhone{{ idx }}"
|
||||
name="loadPhone{{ idx }}"
|
||||
@ -68,11 +69,14 @@
|
||||
</div>
|
||||
</nz-form-item>
|
||||
</div>
|
||||
<div style="display: flex; justify-content: center">
|
||||
<button nz-button nzType="primary" (click)="addStartInfo($event)">
|
||||
<i nz-icon nzType="plus"></i>
|
||||
添加装货地
|
||||
</button>
|
||||
<div nz-row>
|
||||
<div nz-col [nzSpan]="4"></div>
|
||||
<div style="display: flex; justify-content: center">
|
||||
<button nz-button nzType="primary" (click)="addStartInfo()">
|
||||
<i nz-icon nzType="plus"></i>
|
||||
添加装货地
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div nz-col [nzSpan]="4">
|
||||
@ -82,34 +86,38 @@
|
||||
</div>
|
||||
</div>
|
||||
<div nz-col [nzSpan]="10">
|
||||
<div *ngFor="let data of endInfo; let idx = index">
|
||||
<div *ngFor="let data2 of endInfo; let idx = index">
|
||||
<nz-form-item>
|
||||
<nz-form-label [nzSpan]="3" nzRequired>卸货地</nz-form-label>
|
||||
<nz-form-label nzRequired>卸货地</nz-form-label>
|
||||
<nz-form-control [nzErrorTip]="'请输入卸货地'">
|
||||
<div class="align-center">
|
||||
<nz-input-group [nzSuffix]="endInconTemp1">
|
||||
<input
|
||||
nz-input
|
||||
[(ngModel)]="data.detailedAddress"
|
||||
[(ngModel)]="data2.detailedAddress"
|
||||
(click)="openMap('end', idx)"
|
||||
formControlName="unloadAddress{{ idx }}"
|
||||
placeholder="请输入卸货地"
|
||||
name="unloadAddress{{ idx }}"
|
||||
readonly="true"
|
||||
/>
|
||||
</nz-input-group>
|
||||
<span *ngIf="idx !== 0" style="padding: 0 10px"><i nz-icon nzType="minus-circle" nzTheme="outline" style="color: #d9001b" (click)="subEndInfo($event, idx)"></i></span>
|
||||
<span *ngIf="idx !== 0" style="padding: 0 10px"
|
||||
><i nz-icon nzType="minus-circle" nzTheme="outline" style="color: #d9001b" (click)="subEndInfo($event, idx)"></i
|
||||
></span>
|
||||
<span *ngIf="idx == 0" style="visibility:hidden;padding: 0 10px"
|
||||
><i nz-icon nzType="minus-circle" nzTheme="outline" style="color: #d9001b" (click)="subStartInfo($event, idx, data.id)"></i
|
||||
><i nz-icon nzType="minus-circle" nzTheme="outline" style="color: #d9001b" (click)="subStartInfo($event, idx)"></i
|
||||
></span>
|
||||
</div>
|
||||
</nz-form-control>
|
||||
</nz-form-item>
|
||||
<nz-form-item>
|
||||
<nz-form-label [nzSpan]="3" nzRequired>联系人</nz-form-label>
|
||||
<nz-form-label nzRequired>联系人</nz-form-label>
|
||||
<div style="display: flex; width: 80.7%">
|
||||
<nz-form-control [nzErrorTip]="'请输入联系人姓名'">
|
||||
<input
|
||||
nz-input
|
||||
[(ngModel)]="data.appUserName"
|
||||
[(ngModel)]="data2.appUserName"
|
||||
maxlength="30"
|
||||
formControlName="unloadName{{ idx }}"
|
||||
name="unloadAddress{{ idx }}"
|
||||
@ -120,7 +128,7 @@
|
||||
<input
|
||||
style="margin-left: 12px"
|
||||
nz-input
|
||||
[(ngModel)]="data.contractTelephone"
|
||||
[(ngModel)]="data2.contractTelephone"
|
||||
formControlName="unloadPhone{{ idx }}"
|
||||
name="unloadAddress{{ idx }}"
|
||||
maxlength="11"
|
||||
@ -130,97 +138,95 @@
|
||||
</div>
|
||||
</nz-form-item>
|
||||
</div>
|
||||
<div style="display: flex; justify-content: center">
|
||||
<button nz-button nzType="primary" (click)="addEndInfo($event)">
|
||||
<i nz-icon nzType="plus"></i>
|
||||
添加卸货地
|
||||
</button>
|
||||
<div nz-row>
|
||||
<div nz-col [nzSpan]="4"></div>
|
||||
<div style="display: flex; justify-content: center">
|
||||
<button nz-button nzType="primary" (click)="addEndInfo()">
|
||||
<i nz-icon nzType="plus"></i>
|
||||
添加卸货地
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div nz-row [nzGutter]="24" style="margin-top: 24px">
|
||||
<div nz-col [nzSpan]="10">
|
||||
<div nz-col nzXs="2" nzSm="4" nzMd="8" nzLg="8" nzXl="10">
|
||||
<nz-form-item>
|
||||
<nz-form-label [nzSpan]="5" nzRequired>装货时间</nz-form-label>
|
||||
<nz-form-label nzRequired>装货时间</nz-form-label>
|
||||
<nz-form-control [nzErrorTip]="'请输入装货时间'">
|
||||
<nz-date-picker
|
||||
nzShowTime
|
||||
nzFormat="yyyy-MM-dd HH:mm:ss"
|
||||
[ngModel]="loadingTime"
|
||||
(ngModelChange)="changeLO($event)"
|
||||
[ngModelOptions]="{ standalone: true }"
|
||||
></nz-date-picker>
|
||||
[nzShowTime]="{ nzFormat: 'HH' }"
|
||||
nzFormat="yyyy-MM-dd HH:00前"
|
||||
formControlName="loadingTime"
|
||||
[nzDisabledDate]="disabledDateStart"
|
||||
></nz-date-picker>
|
||||
</nz-form-control>
|
||||
</nz-form-item>
|
||||
</div>
|
||||
<div nz-col [nzSpan]="4"></div>
|
||||
<div nz-col [nzSpan]="10">
|
||||
<div nz-col nzXs="20" nzSm="16" nzMd="12" nzLg="8" nzXl="4"></div>
|
||||
<div nz-col nzXs="2" nzSm="4" nzMd="8" nzLg="8" nzXl="10">
|
||||
<nz-form-item>
|
||||
<nz-form-label [nzSpan]="5" nzRequired>卸货时间</nz-form-label>
|
||||
<nz-form-label nzRequired>卸货时间</nz-form-label>
|
||||
<nz-form-control [nzErrorTip]="'请输入卸货时间'">
|
||||
<nz-date-picker
|
||||
nzShowTime
|
||||
nzFormat="yyyy-MM-dd HH:mm:ss"
|
||||
[ngModel]="unloadingTime"
|
||||
(ngModelChange)="changeUn($event)"
|
||||
[ngModelOptions]="{ standalone: true }"
|
||||
></nz-date-picker>
|
||||
<nz-date-picker [nzShowTime]="{ nzFormat: 'HH' }"
|
||||
nzFormat="yyyy-MM-dd HH:00前" formControlName="unloadingTime"></nz-date-picker>
|
||||
</nz-form-control>
|
||||
</nz-form-item>
|
||||
</div>
|
||||
</div>
|
||||
<ng-template #endInconTemp1><i nz-icon nzType="global"></i></ng-template>
|
||||
<ng-template #endInconTemp1><i nz-icon nzType="environment" nzTheme="outline"></i></ng-template>
|
||||
</form>
|
||||
</nz-card>
|
||||
|
||||
<nz-card>
|
||||
<div class="card-title">货物信息</div>
|
||||
<div nz-row>
|
||||
<div nz-col nzSpan="24">
|
||||
<sf #sf3 [schema]="schema3" [formData]="sf3data" [button]="'none'" [ui]="ui3"></sf>
|
||||
<sf #sf4 [schema]="schema4" [formData]="sf4data" [button]="'none'" [ui]="ui4">
|
||||
<ng-template sf-template="weight" let-i let-ui="ui">
|
||||
<nz-input-group [nzAddOnAfter]="'吨'">
|
||||
<input
|
||||
nz-input
|
||||
type="number"
|
||||
[ngModel]="i.value"
|
||||
min="0"
|
||||
step="0.01"
|
||||
(ngModelChange)="i.setValue($event)"
|
||||
placeholder="总重量,必填"
|
||||
/>
|
||||
</nz-input-group>
|
||||
</ng-template>
|
||||
<ng-template sf-template="volume" let-i let-ui="ui">
|
||||
<nz-input-group [nzAddOnAfter]="'方'">
|
||||
<input
|
||||
nz-input
|
||||
type="number"
|
||||
[ngModel]="i.value"
|
||||
min="0"
|
||||
step="0.01"
|
||||
(ngModelChange)="i.setValue($event)"
|
||||
placeholder="总体积"
|
||||
/>
|
||||
</nz-input-group>
|
||||
</ng-template>
|
||||
<ng-template sf-template="number" let-i let-ui="ui">
|
||||
<nz-input-group [nzAddOnAfter]="'车'">
|
||||
<input
|
||||
nz-input
|
||||
type="number"
|
||||
[ngModel]="i.value"
|
||||
min="0"
|
||||
step="0.01"
|
||||
(ngModelChange)="i.setValue($event)"
|
||||
placeholder="总车次"
|
||||
/>
|
||||
</nz-input-group>
|
||||
</ng-template>
|
||||
</sf>
|
||||
<div nz-col nzSpan="16">
|
||||
<sf #sf3 [schema]="schema3" [button]="'none'" [ui]="ui3" [formData]="sf3data"></sf>
|
||||
</div>
|
||||
</div>
|
||||
<sf #sf4 [schema]="schema4" [button]="'none'" [ui]="ui4" [formData]="sf4data">
|
||||
<ng-template sf-template="weight" let-i let-ui="ui">
|
||||
<nz-input-group [nzAddOnAfter]="'吨'">
|
||||
<input
|
||||
nz-input
|
||||
type="number"
|
||||
[ngModel]="i.value"
|
||||
min="0"
|
||||
step="0.01"
|
||||
(ngModelChange)="i.setValue($event)"
|
||||
placeholder="总重量,必填"
|
||||
oninput="if(value>99999)value=99999;if(value<0)value=0"
|
||||
/>
|
||||
</nz-input-group>
|
||||
</ng-template>
|
||||
<ng-template sf-template="volume" let-i let-ui="ui">
|
||||
<nz-input-group [nzAddOnAfter]="'方'">
|
||||
<input
|
||||
nz-input
|
||||
type="number"
|
||||
[ngModel]="i.value"
|
||||
min="0"
|
||||
step="0.01"
|
||||
(ngModelChange)="i.setValue($event)"
|
||||
placeholder="体积"
|
||||
oninput="if(value>99999)value=99999;if(value<0)value=0"
|
||||
/>
|
||||
</nz-input-group>
|
||||
</ng-template>
|
||||
<ng-template sf-template="number" let-i let-ui="ui">
|
||||
<nz-input-group [nzAddOnAfter]="'件'">
|
||||
<input
|
||||
nz-input
|
||||
type="number"
|
||||
[ngModel]="i.value"
|
||||
min="0"
|
||||
(ngModelChange)="i.setValue($event)"
|
||||
placeholder="车次"
|
||||
oninput="if(value>99999)value=99999;if(value<0)value=0"
|
||||
/>
|
||||
</nz-input-group>
|
||||
</ng-template>
|
||||
</sf>
|
||||
</nz-card>
|
||||
|
||||
<nz-card>
|
||||
@ -239,7 +245,7 @@
|
||||
[nzMin]="50000"
|
||||
[nzMax]="3000000"
|
||||
[nzStep]="0.01"
|
||||
(ngModelChange)="i.setValue($event);getInsurersPrice($event)"
|
||||
(ngModelChange)="i.setValue($event);getInsurersPrice()"
|
||||
nzPlaceHolder="请输入50000-3000000之间数值"
|
||||
></nz-input-number>
|
||||
</div>
|
||||
@ -324,7 +330,7 @@
|
||||
<ng-template sf-template="paymentDays" let-i let-ui="ui">
|
||||
<div nz-row>
|
||||
<div class="align-center">
|
||||
<div nz-col nzSpan="16">
|
||||
<div nz-col nzSpan="12">
|
||||
<nz-input-number
|
||||
[ngModel]="i.value"
|
||||
[nzMin]="1"
|
||||
@ -336,7 +342,7 @@
|
||||
[nzPrecisionMode]="'cut'"
|
||||
></nz-input-number>
|
||||
</div>
|
||||
<div nz-col nzSpan="8">
|
||||
<div nz-col nzSpan="12">
|
||||
<span> 天内支付运费</span>
|
||||
</div>
|
||||
</div>
|
||||
@ -353,7 +359,7 @@
|
||||
acl [acl-ability]="['SUPPLY-VEHICLE-AMEND-submitChange']">提交修改</button
|
||||
>
|
||||
<button nz-button nzType="primary" *ngIf="this.PageStatus == '整车下一单'" (click)="submitConfirm('assign')" acl [acl-ability]="['SUPPLY-BULK-PLACEORDER-vehicleDesignate']">指派熟车</button>
|
||||
<button *ngIf="this.PageStatus == '整车下一单'" nz-button nzType="primary" style="margin-left: 48px" (click)="submitConfirm()"
|
||||
<button *ngIf="this.PageStatus == '整车下一单'" nz-button nzType="primary" style="margin-left: 48px" (click)="submitConfirm('publish')"
|
||||
acl [acl-ability]="['SUPPLY-BULK-PLACEORDER-vehicleAnotherOrder']">司机抢单</button
|
||||
>
|
||||
</div>
|
||||
|
||||
@ -50,7 +50,3 @@ input[type='number']::-webkit-outer-spin-button {
|
||||
margin: 0;
|
||||
-webkit-appearance: none;
|
||||
}
|
||||
.hides {
|
||||
margin-left: 10px;
|
||||
color: aqua;
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -1,25 +1,18 @@
|
||||
<!--
|
||||
* @Description :
|
||||
* @Version : 1.0
|
||||
* @Author : Shiming
|
||||
* @Date : 2021-12-03 11:10:14
|
||||
* @LastEditors : Shiming
|
||||
* @LastEditTime : 2022-01-18 17:28:37
|
||||
* @FilePath : \\tms-obc-web\\src\\app\\routes\\supply-management\\components\\qrcode-page\\qrcode-page.component.html
|
||||
* Copyright (C) 2022 huzhenhong. All rights reserved.
|
||||
-->
|
||||
|
||||
<nz-spin *ngIf="!i" class="modal-spin"></nz-spin>
|
||||
<div style="width: 50%; margin: 0 auto">
|
||||
<div class="">
|
||||
<h2>公司名称 : {{ i?.enterpriseInfoName }}</h2>
|
||||
<qr [value]="i.id" #qr></qr>
|
||||
<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>Tips : 二维码用于司机扫码抢单</div>
|
||||
<div>
|
||||
<nz-alert nzType="warning" nzMessage="二维码用于司机扫码抢单" nzShowIcon></nz-alert>
|
||||
<div style="width: 80%;margin: 0 auto;" id="qr_page">
|
||||
<div style="text-align: center;">
|
||||
|
||||
<h2> {{i?.shipperAppUserName}}</h2>
|
||||
<qr [value]="qrCodeValue" #qr></qr>
|
||||
<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)="toCanvasPhoto()">下载二维码</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer text-center">
|
||||
<button nz-button type="submit" nzType="primary" (click)="downLoadQrcode('二维码')">下载二维码</button>
|
||||
</div>
|
||||
|
||||
@ -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 { SupplyManagementQrcodePageComponent } from './qrcode-page.component';
|
||||
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
* @Author : Shiming
|
||||
* @Date : 2021-12-03 11:10:14
|
||||
* @LastEditors : Shiming
|
||||
* @LastEditTime : 2022-01-18 17:28:46
|
||||
* @LastEditTime : 2022-03-01 14:19:47
|
||||
* @FilePath : \\tms-obc-web\\src\\app\\routes\\supply-management\\components\\qrcode-page\\qrcode-page.component.ts
|
||||
* Copyright (C) 2022 huzhenhong. All rights reserved.
|
||||
*/
|
||||
@ -13,6 +13,7 @@ import { Component, OnInit, ViewChild } from '@angular/core';
|
||||
import { QRComponent } from '@delon/abc/qr';
|
||||
import { SFSchema, SFUISchema } from '@delon/form';
|
||||
import { NzModalRef } from 'ng-zorro-antd/modal';
|
||||
import html2canvas from 'html2canvas';
|
||||
|
||||
@Component({
|
||||
selector: 'app-supply-management-qrcode-page',
|
||||
@ -23,39 +24,50 @@ export class SupplyManagementQrcodePageComponent implements OnInit {
|
||||
record: any = {};
|
||||
i: any;
|
||||
schema: SFSchema = {};
|
||||
qrCodeValue = '';
|
||||
ui: SFUISchema = {
|
||||
'*': {
|
||||
spanLabelFixed: 100,
|
||||
grid: { span: 12 }
|
||||
grid: { span: 12 },
|
||||
},
|
||||
$no: {
|
||||
widget: 'text'
|
||||
},
|
||||
$href: {
|
||||
widget: 'string'
|
||||
widget: 'string',
|
||||
},
|
||||
$description: {
|
||||
widget: 'textarea',
|
||||
grid: { span: 24 }
|
||||
}
|
||||
grid: { span: 24 },
|
||||
},
|
||||
};
|
||||
|
||||
constructor(private modal: NzModalRef) {}
|
||||
constructor(
|
||||
private modal: NzModalRef,
|
||||
) { }
|
||||
|
||||
ngOnInit(): void {
|
||||
console.log(this.i);
|
||||
this.qrCodeValue = `rid:${this.i?.id}`;
|
||||
}
|
||||
|
||||
downLoadQrcode(downloadName: any): void {
|
||||
|
||||
/**
|
||||
* 下载二维码
|
||||
* @param downloadName 文件名
|
||||
* @param contents 内容
|
||||
*/
|
||||
downLoadQrcode(downloadName: any, contents: any): void {
|
||||
let aLink = document.createElement('a');
|
||||
const content = this.qr.dataURL;
|
||||
const content = contents;
|
||||
let blob = this.base64ToBlob(content); //new Blob([content]);
|
||||
let evt = document.createEvent('HTMLEvents');
|
||||
evt.initEvent('click', true, true); //initEvent 不加后两个参数在IE下会报错 事件类型,是否冒泡,是否阻止浏览器的默认行为
|
||||
let evt = document.createEvent("HTMLEvents");
|
||||
evt.initEvent("click", true, true);//initEvent 不加后两个参数在IE下会报错 事件类型,是否冒泡,是否阻止浏览器的默认行为
|
||||
aLink.download = downloadName;
|
||||
aLink.href = URL.createObjectURL(blob);
|
||||
// aLink.dispatchEvent(evt);
|
||||
aLink.click();
|
||||
|
||||
|
||||
}
|
||||
|
||||
//base64转blob
|
||||
@ -74,4 +86,18 @@ export class SupplyManagementQrcodePageComponent implements OnInit {
|
||||
close(): void {
|
||||
this.modal.destroy();
|
||||
}
|
||||
|
||||
/**
|
||||
* 把页面装成canvas
|
||||
*/
|
||||
toCanvasPhoto() {
|
||||
let aLink = document.createElement('a');
|
||||
html2canvas(document.getElementById('qr_page')!, { height: 340 }).then((canvas:any) => {
|
||||
let url = canvas.toDataURL("image/jpeg");
|
||||
this.downLoadQrcode('二维码', url);
|
||||
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ -26,7 +26,7 @@
|
||||
<div nz-col [nzSpan]="10">
|
||||
<div *ngFor="let data1 of startInfo; let idx = index">
|
||||
<nz-form-item>
|
||||
<nz-form-label [nzSpan]="3" nzRequired>装货地</nz-form-label>
|
||||
<nz-form-label nzRequired>装货地</nz-form-label>
|
||||
<nz-form-control [nzErrorTip]="'请输入装货地'">
|
||||
<div class="align-center">
|
||||
<nz-input-group [nzSuffix]="endInconTemp1">
|
||||
@ -36,6 +36,7 @@
|
||||
(click)="openMap('start', idx)"
|
||||
formControlName="loadAddress{{ idx }}"
|
||||
placeholder="请输入装货地"
|
||||
readonly="true"
|
||||
/>
|
||||
</nz-input-group>
|
||||
<span *ngIf="idx !== 0" style="padding: 0 10px"
|
||||
@ -48,7 +49,7 @@
|
||||
</nz-form-control>
|
||||
</nz-form-item>
|
||||
<nz-form-item>
|
||||
<nz-form-label [nzSpan]="3" nzRequired>联系人</nz-form-label>
|
||||
<nz-form-label nzRequired>联系人</nz-form-label>
|
||||
<div style="display: flex; width: 80.7%">
|
||||
<nz-form-control [nzErrorTip]="'请输入联系人姓名'">
|
||||
<input
|
||||
@ -93,7 +94,7 @@
|
||||
<div nz-col [nzSpan]="10">
|
||||
<div *ngFor="let data2 of endInfo; let idx = index">
|
||||
<nz-form-item>
|
||||
<nz-form-label [nzSpan]="4" nzRequired>卸货地</nz-form-label>
|
||||
<nz-form-label nzRequired>卸货地</nz-form-label>
|
||||
<nz-form-control [nzErrorTip]="'请输入卸货地'">
|
||||
<div class="align-center">
|
||||
<nz-input-group [nzSuffix]="endInconTemp1">
|
||||
@ -104,6 +105,7 @@
|
||||
formControlName="unloadAddress{{ idx }}"
|
||||
placeholder="请输入卸货地"
|
||||
name="unloadAddress{{ idx }}"
|
||||
readonly="true"
|
||||
/>
|
||||
</nz-input-group>
|
||||
<span *ngIf="idx !== 0" style="padding: 0 10px"
|
||||
@ -116,7 +118,7 @@
|
||||
</nz-form-control>
|
||||
</nz-form-item>
|
||||
<nz-form-item>
|
||||
<nz-form-label [nzSpan]="3" nzRequired>联系人</nz-form-label>
|
||||
<nz-form-label nzRequired>联系人</nz-form-label>
|
||||
<div style="display: flex; width: 80.7%">
|
||||
<nz-form-control [nzErrorTip]="'请输入联系人姓名'">
|
||||
<input
|
||||
@ -156,18 +158,24 @@
|
||||
<div nz-row [nzGutter]="24" style="margin-top: 24px">
|
||||
<div nz-col [nzSpan]="10">
|
||||
<nz-form-item>
|
||||
<nz-form-label [nzSpan]="3" nzRequired>装货时间</nz-form-label>
|
||||
<nz-form-label nzRequired>装货时间</nz-form-label>
|
||||
<nz-form-control [nzErrorTip]="'请输入装货时间'">
|
||||
<nz-date-picker nzShowTime nzFormat="yyyy-MM-dd HH:mm:ss" formControlName="loadingTime" name="loadingTime"></nz-date-picker>
|
||||
<nz-date-picker
|
||||
[nzShowTime]="{ nzFormat: 'HH' }"
|
||||
nzFormat="yyyy-MM-dd HH:00前"
|
||||
formControlName="loadingTime"
|
||||
[nzDisabledDate]="disabledDateStart"
|
||||
></nz-date-picker>
|
||||
</nz-form-control>
|
||||
</nz-form-item>
|
||||
</div>
|
||||
<div nz-col [nzSpan]="4"></div>
|
||||
<div nz-col [nzSpan]="10">
|
||||
<nz-form-item>
|
||||
<nz-form-label [nzSpan]="3" nzRequired>卸货时间</nz-form-label>
|
||||
<nz-form-label nzRequired>卸货时间</nz-form-label>
|
||||
<nz-form-control [nzErrorTip]="'请输入卸货时间'">
|
||||
<nz-date-picker nzShowTime nzFormat="yyyy-MM-dd HH:mm:ss" formControlName="unloadingTime" name="unloadingTime"></nz-date-picker>
|
||||
<nz-date-picker [nzShowTime]="{ nzFormat: 'HH' }"
|
||||
nzFormat="yyyy-MM-dd HH:00前" formControlName="unloadingTime"></nz-date-picker>
|
||||
</nz-form-control>
|
||||
</nz-form-item>
|
||||
</div>
|
||||
@ -335,7 +343,7 @@
|
||||
<ng-template sf-template="paymentDays" let-i let-ui="ui">
|
||||
<div nz-row>
|
||||
<div class="align-center">
|
||||
<div nz-col nzSpan="16">
|
||||
<div nz-col nzSpan="12">
|
||||
<nz-input-number
|
||||
[ngModel]="i.value"
|
||||
[nzMin]="1"
|
||||
@ -347,7 +355,7 @@
|
||||
[nzPrecisionMode]="'cut'"
|
||||
></nz-input-number>
|
||||
</div>
|
||||
<div nz-col nzSpan="8">
|
||||
<div nz-col nzSpan="12">
|
||||
<span> 天内支付运费</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -2,6 +2,7 @@ import { Component, OnInit, ViewChild } from '@angular/core';
|
||||
import { FormBuilder, FormControl, FormGroup, Validators } from '@angular/forms';
|
||||
import { ActivatedRoute, Router } from '@angular/router';
|
||||
import { cacheConf } from '@conf/cache.conf';
|
||||
import differenceInCalendarDays from 'date-fns/differenceInCalendarDays';
|
||||
import {
|
||||
SFCheckboxWidgetSchema,
|
||||
SFComponent,
|
||||
@ -65,10 +66,10 @@ export class SupplyManagementReleasePublishComponent implements OnInit {
|
||||
this.validateForm1 = fb.group({
|
||||
loadAddress0: [null, [Validators.required]],
|
||||
loadName0: [null, [Validators.required]],
|
||||
loadPhone0: [null, [Validators.required,Validators.pattern('^[0-9]*$')]],
|
||||
loadPhone0: [null, [Validators.required, Validators.pattern('^[0-9]*$')]],
|
||||
unloadAddress0: [null, [Validators.required]],
|
||||
unloadName0: [null, [Validators.required]],
|
||||
unloadPhone0: [null, [Validators.required,Validators.pattern('^[0-9]*$')]],
|
||||
unloadPhone0: [null, [Validators.required, Validators.pattern('^[0-9]*$')]],
|
||||
loadingTime: [null, []],
|
||||
unloadingTime: [null, []]
|
||||
});
|
||||
@ -89,7 +90,7 @@ export class SupplyManagementReleasePublishComponent implements OnInit {
|
||||
@ViewChild('sf5', { static: false }) sf5!: SFComponent;
|
||||
schema5: SFSchema = {};
|
||||
ui5!: SFUISchema;
|
||||
|
||||
|
||||
@ViewChild('sf55', { static: false }) sf55!: SFComponent;
|
||||
schema55: SFSchema = {};
|
||||
ui55!: SFUISchema;
|
||||
@ -101,15 +102,24 @@ export class SupplyManagementReleasePublishComponent implements OnInit {
|
||||
@ViewChild('sf7', { static: false }) sf7!: SFComponent;
|
||||
schema7: SFSchema = {};
|
||||
ui7!: SFUISchema;
|
||||
formatterRmb = (value: number): string =>{
|
||||
if(value){
|
||||
let value2 = Number(value).toLocaleString(undefined,{'minimumFractionDigits':2,'maximumFractionDigits':2});
|
||||
return `¥ ${value2}`;
|
||||
limitValues = {
|
||||
maxWeight: 99999,
|
||||
maxVolume: 99999,
|
||||
maxPiece: 99999,
|
||||
maxDays: 999,
|
||||
intervalDays: 999,
|
||||
maxTimes: 999
|
||||
};
|
||||
|
||||
formatterRmb = (value: number): string => {
|
||||
if (value === null || value === undefined) {
|
||||
return '';
|
||||
} else {
|
||||
let value2 = Number(value).toLocaleString(undefined, { minimumFractionDigits: 2, maximumFractionDigits: 2 });
|
||||
return `¥${value2}`;
|
||||
}
|
||||
return `¥ 0.00`
|
||||
|
||||
} ;
|
||||
parserRmb = (value: string): string => value.replace('¥ ', '').replace(',','');
|
||||
};
|
||||
parserRmb = (value: string): string => value.replace('¥', '').replace(',', '');
|
||||
// 页面初始化
|
||||
ngOnInit(): void {
|
||||
this.initSF1();
|
||||
@ -120,6 +130,7 @@ export class SupplyManagementReleasePublishComponent implements OnInit {
|
||||
this.initSF7();
|
||||
this.addStartInfo();
|
||||
this.addEndInfo();
|
||||
this.getLimitvalue();
|
||||
}
|
||||
initSF1() {
|
||||
this.schema1 = {
|
||||
@ -134,9 +145,11 @@ export class SupplyManagementReleasePublishComponent implements OnInit {
|
||||
searchDebounceTime: 300,
|
||||
searchLoadingText: '搜索中...',
|
||||
onSearch: (q: any) => {
|
||||
if (!!q) {
|
||||
console.log(q === ' ');
|
||||
let str = q.replace(/^\s+|\s+$/g, '');
|
||||
if (str) {
|
||||
return this.service
|
||||
.request(this.service.$api_enterpriceList, { enterpriseName: q })
|
||||
.request(this.service.$api_enterpriceList, { enterpriseName: str })
|
||||
.pipe(map(res => (res as any[]).map(i => ({ label: i.enterpriseName, value: i.id } as SFSchemaEnum))))
|
||||
.toPromise();
|
||||
} else {
|
||||
@ -144,8 +157,12 @@ export class SupplyManagementReleasePublishComponent implements OnInit {
|
||||
}
|
||||
},
|
||||
change: (q: any) => {
|
||||
this.getRegionCode(q);
|
||||
},
|
||||
let str = q.replace(/^\s+|\s+$/g, '');
|
||||
if (str) {
|
||||
this.getRegionCode(str);
|
||||
this.payChange();
|
||||
}
|
||||
}
|
||||
} as SFSelectWidgetSchema
|
||||
},
|
||||
enterpriseProjectId: {
|
||||
@ -172,7 +189,8 @@ export class SupplyManagementReleasePublishComponent implements OnInit {
|
||||
widget: 'select',
|
||||
placeholder: '请选择',
|
||||
allowClear: true,
|
||||
asyncData: () => this.shipperSrv.getNetworkFreightForwarder()
|
||||
asyncData: () => this.shipperSrv.getNetworkFreightForwarder(),
|
||||
change: () => this.payChange()
|
||||
}
|
||||
},
|
||||
externalResourceCode: {
|
||||
@ -220,7 +238,7 @@ export class SupplyManagementReleasePublishComponent implements OnInit {
|
||||
} as SFSelectWidgetSchema
|
||||
}
|
||||
},
|
||||
required: ['shipperAppUserId', 'enterpriseProjectId', 'enterpriseInfoName', ]
|
||||
required: ['shipperAppUserId', 'enterpriseProjectId', 'enterpriseInfoName']
|
||||
};
|
||||
this.ui1 = {
|
||||
'*': {
|
||||
@ -241,7 +259,7 @@ export class SupplyManagementReleasePublishComponent implements OnInit {
|
||||
ui: {
|
||||
widget: 'select',
|
||||
placeholder: '请选择',
|
||||
errors: { required: '请选择货物类型' },
|
||||
errors: { required: '请选择货物名称' },
|
||||
asyncData: () =>
|
||||
this.shipperSrv.loadConfigByKey('goods.name.config.type').pipe(
|
||||
map((data: any) => {
|
||||
@ -270,7 +288,7 @@ export class SupplyManagementReleasePublishComponent implements OnInit {
|
||||
widget: 'select',
|
||||
placeholder: '请选择',
|
||||
errors: { required: '请填写货物名称' },
|
||||
change: (_value: any, data: any) => {
|
||||
change: (value: any, data: any) => {
|
||||
this.sf3.setValue('/goodsName', data.label);
|
||||
},
|
||||
visibleIf: {
|
||||
@ -299,11 +317,11 @@ export class SupplyManagementReleasePublishComponent implements OnInit {
|
||||
}
|
||||
}
|
||||
},
|
||||
required: ['goodsTypeId', 'goodsName', 'goodsNameId']
|
||||
required: ['goodsTypeId', 'goodsName', 'goodsNameId', 'goodsName1']
|
||||
};
|
||||
this.ui3 = {
|
||||
'*': {
|
||||
spanLabelFixed: 90,
|
||||
spanLabelFixed: 115,
|
||||
grid: { span: 12 }
|
||||
}
|
||||
};
|
||||
@ -317,7 +335,8 @@ export class SupplyManagementReleasePublishComponent implements OnInit {
|
||||
ui: {
|
||||
widget: 'custom',
|
||||
placeholder: '请输入',
|
||||
errors: { required: '必填项' }
|
||||
errors: { required: '必填项' },
|
||||
validator: val => this.customValidator(val)
|
||||
}
|
||||
},
|
||||
volume: {
|
||||
@ -342,13 +361,13 @@ export class SupplyManagementReleasePublishComponent implements OnInit {
|
||||
ui: {
|
||||
widget: 'select',
|
||||
mode: 'multiple',
|
||||
maxMultipleCount:3,
|
||||
maxMultipleCount: 3,
|
||||
placeholder: '请选择车型',
|
||||
errors: { required: '请选择车型' },
|
||||
asyncData: () => this.service.getDictOptions({ dictKey: 'car:model' }),
|
||||
change:(tag:any , org:any)=>{
|
||||
if(tag.includes("999")){
|
||||
this.sf4.setValue('/carModel',["999"]);
|
||||
change: (tag: any, org: any) => {
|
||||
if (tag.includes('999')) {
|
||||
this.sf4.setValue('/carModel', ['999']);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -359,43 +378,32 @@ export class SupplyManagementReleasePublishComponent implements OnInit {
|
||||
ui: {
|
||||
widget: 'select',
|
||||
mode: 'multiple',
|
||||
maxMultipleCount:3,
|
||||
maxMultipleCount: 3,
|
||||
placeholder: '请选择车长',
|
||||
errors: { required: '请选择车长' },
|
||||
asyncData: () => this.service.getDictOptions({ dictKey: 'car:length' }),
|
||||
change:(tag:any , org:any)=>{
|
||||
if(tag.includes("999")){
|
||||
this.sf4.setValue('/carModel',["999"]);
|
||||
change: (tag: any, org: any) => {
|
||||
if (tag.includes('999')) {
|
||||
this.sf4.setValue('/carLength', ['999']);
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
}
|
||||
},
|
||||
required: ['weight', 'carModel', 'carLength']
|
||||
};
|
||||
this.ui4 = {
|
||||
'*': {
|
||||
spanLabelFixed: 90,
|
||||
grid: { span: 24 }
|
||||
},
|
||||
$weight: {
|
||||
grid: { lg: 8, md: 12, sm: 12, xs: 24 }
|
||||
},
|
||||
$volume: {
|
||||
grid: { lg: 8, md: 12, sm: 12, xs: 24 }
|
||||
},
|
||||
$number: {
|
||||
grid: { lg: 8, md: 12, sm: 12, xs: 24 }
|
||||
spanLabelFixed: 115,
|
||||
grid: { span: 8 }
|
||||
},
|
||||
$carModel: {
|
||||
spanLabelFixed: 100,
|
||||
grid: { span: 8 }
|
||||
},
|
||||
$carLength: {
|
||||
grid: { span: 8 }
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
initSF5() {
|
||||
this.schema5 = {
|
||||
properties: {
|
||||
@ -403,8 +411,17 @@ export class SupplyManagementReleasePublishComponent implements OnInit {
|
||||
type: 'string',
|
||||
title: '增值服务套餐',
|
||||
ui: {
|
||||
widget: 'dict-select',
|
||||
params: { dictKey: 'bill:insurance:type' },
|
||||
widget: 'select',
|
||||
asyncData: () => {
|
||||
return this.service.request(this.service.$api_getDictValue, { dictKey: 'bill:insurance:type' }).pipe(
|
||||
map((res: any) => {
|
||||
return [...res];
|
||||
})
|
||||
);
|
||||
},
|
||||
change: (tag: any, org: any) => {
|
||||
this.getInsurersPrice(tag);
|
||||
}
|
||||
},
|
||||
default: '3'
|
||||
},
|
||||
@ -415,7 +432,7 @@ export class SupplyManagementReleasePublishComponent implements OnInit {
|
||||
readOnly: true,
|
||||
ui: {
|
||||
widget: 'checkbox',
|
||||
visibleIf: { insuranceType: (value: string) => value === '0' }
|
||||
visibleIf: { insuranceType: (value: string) => value === '1' }
|
||||
} as SFCheckboxWidgetSchema,
|
||||
default: ['车辆实时定位', '轨迹查询', '数据保护', '赠送基本险']
|
||||
},
|
||||
@ -426,7 +443,7 @@ export class SupplyManagementReleasePublishComponent implements OnInit {
|
||||
readOnly: true,
|
||||
ui: {
|
||||
widget: 'checkbox',
|
||||
visibleIf: { insuranceType: (value: string) => value === '1' }
|
||||
visibleIf: { insuranceType: (value: string) => value === '2' }
|
||||
} as SFCheckboxWidgetSchema,
|
||||
default: ['车辆实时定位', '轨迹查询', '数据保护', '专属技术服务', '赠送综合险']
|
||||
},
|
||||
@ -438,21 +455,22 @@ export class SupplyManagementReleasePublishComponent implements OnInit {
|
||||
visibleIf: { insuranceType: (value: string) => value !== '3' }
|
||||
}
|
||||
},
|
||||
insurancePackagedGoods:{
|
||||
insurancePackagedGoods: {
|
||||
type: 'string',
|
||||
title: '货物包装',
|
||||
ui: {
|
||||
widget: 'dict-select',
|
||||
params: { dictKey: 'insure:packaged:goods' },
|
||||
containsAllLabel: false,
|
||||
visibleIf: { insuranceType: (value: string) => value !== '3' }
|
||||
} as SFSelectWidgetSchema
|
||||
},
|
||||
hidenField:{
|
||||
hidenField: {
|
||||
type: 'string',
|
||||
title: '',
|
||||
default:' ',
|
||||
default: ' ',
|
||||
ui: {
|
||||
widget:'text'
|
||||
widget: 'text'
|
||||
}
|
||||
},
|
||||
goodsValue: {
|
||||
@ -469,6 +487,7 @@ export class SupplyManagementReleasePublishComponent implements OnInit {
|
||||
title: '',
|
||||
ui: {
|
||||
widget: 'custom',
|
||||
validator: val => this.customValidator(val),
|
||||
visibleIf: { insuranceType: (value: string) => value !== '3' }
|
||||
}
|
||||
},
|
||||
@ -478,26 +497,27 @@ export class SupplyManagementReleasePublishComponent implements OnInit {
|
||||
ui: {
|
||||
hidden: true
|
||||
}
|
||||
},
|
||||
}
|
||||
},
|
||||
required: ['insurancePackagedGoods']
|
||||
required: ['insurancePackagedGoods', 'insurancePremium']
|
||||
};
|
||||
this.ui5 = {
|
||||
'*': {
|
||||
spanLabelFixed: 115,
|
||||
grid: { span: 12 }
|
||||
},
|
||||
$type1:{
|
||||
$type1: {
|
||||
grid: { span: 24 }
|
||||
},
|
||||
$type2:{
|
||||
$type2: {
|
||||
grid: { span: 24 }
|
||||
},
|
||||
$freeInsurance:{
|
||||
$freeInsurance: {
|
||||
grid: { span: 24 }
|
||||
},
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
initSF6() {
|
||||
this.schema6 = {
|
||||
properties: {
|
||||
@ -520,7 +540,7 @@ export class SupplyManagementReleasePublishComponent implements OnInit {
|
||||
ui: {
|
||||
widget: 'dict-select',
|
||||
params: { dictKey: 'receipt:type' },
|
||||
containsAllLable: false,
|
||||
containsAllLabel: false,
|
||||
placeholder: '请选择',
|
||||
errors: { required: '请选择' },
|
||||
visibleIf: {
|
||||
@ -528,58 +548,65 @@ export class SupplyManagementReleasePublishComponent implements OnInit {
|
||||
}
|
||||
}
|
||||
},
|
||||
// receiptAddressId: {
|
||||
// type: 'string',
|
||||
// title: '选择地址',
|
||||
// ui: {
|
||||
// widget: 'custom',
|
||||
// placeholder: '请点击选择收回单地址',
|
||||
// // validator: val => (this.sf6?.value?.receiptType === '2' ? [{ keyword: 'required', message: '请点击选择收回单地址' }] : []),
|
||||
// visibleIf: {
|
||||
// receiptType: value => value === '2'
|
||||
// }
|
||||
// },
|
||||
// default: ''
|
||||
// },
|
||||
receiptAddress: {
|
||||
type: 'string',
|
||||
title: '回单收件人信息',
|
||||
ui: {
|
||||
widget: 'custom',
|
||||
placeholder: '请点击选择回单收件人信息',
|
||||
// validator: val => (this.sf6?.value?.receiptType === '2' ? [{ keyword: 'required', message: '请点击选择收回单地址' }] : []),
|
||||
visibleIf: {
|
||||
receiptType: value => value === '2'
|
||||
}
|
||||
},
|
||||
default: ''
|
||||
},
|
||||
receiptAddressId: {
|
||||
type: 'string',
|
||||
title: '',
|
||||
ui: {
|
||||
hidden: true
|
||||
}
|
||||
},
|
||||
receiptUserName: {
|
||||
type: 'string',
|
||||
title: '联系人',
|
||||
maxLength: 15,
|
||||
ui: {
|
||||
visibleIf: {
|
||||
receiptType: value => value === '2'
|
||||
}
|
||||
},
|
||||
readOnly: true
|
||||
},
|
||||
receiptUserPhone: {
|
||||
phon: {
|
||||
type: 'string',
|
||||
title: '联系电话',
|
||||
maxLength: 11,
|
||||
ui: {
|
||||
visibleIf: {
|
||||
receiptType: value => value === '2'
|
||||
}
|
||||
},
|
||||
readOnly: true
|
||||
},
|
||||
receiptAddressArea: {
|
||||
area: {
|
||||
type: 'string',
|
||||
title: '所在地区',
|
||||
maxLength: 30,
|
||||
ui: {
|
||||
visibleIf: {
|
||||
receiptType: value => value === '2'
|
||||
}
|
||||
},
|
||||
readOnly: true
|
||||
},
|
||||
receiptAddress: {
|
||||
address: {
|
||||
type: 'string',
|
||||
title: '详细地址',
|
||||
maxLength: 50,
|
||||
ui: {
|
||||
visibleIf: {
|
||||
receiptType: value => value === '2'
|
||||
}
|
||||
},
|
||||
readOnly: true
|
||||
},
|
||||
remarks: {
|
||||
type: 'string',
|
||||
@ -592,15 +619,16 @@ export class SupplyManagementReleasePublishComponent implements OnInit {
|
||||
} as SFTextareaWidgetSchema
|
||||
}
|
||||
},
|
||||
required: ['stateReceipt', 'receiptType', 'receiptUserName','receiptUserPhone','receiptAddressArea','receiptAddress']
|
||||
required: ['stateReceipt', 'receiptType', 'receiptAddress']
|
||||
};
|
||||
this.ui6 = {
|
||||
'*': {
|
||||
spanLabelFixed: 90,
|
||||
spanLabelFixed: 115,
|
||||
grid: { span: 24 }
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
initSF7() {
|
||||
this.schema7 = {
|
||||
properties: {
|
||||
@ -608,19 +636,19 @@ export class SupplyManagementReleasePublishComponent implements OnInit {
|
||||
type: 'number',
|
||||
title: '预付',
|
||||
default: 0,
|
||||
ui: {widget: 'custom'}
|
||||
ui: { widget: 'custom' }
|
||||
},
|
||||
toPay: {
|
||||
type: 'number',
|
||||
title: '到付',
|
||||
default: 0,
|
||||
ui: { widget: 'custom'}
|
||||
ui: { widget: 'custom' }
|
||||
},
|
||||
receiptPay: {
|
||||
type: 'number',
|
||||
title: '回单付',
|
||||
default: 0,
|
||||
ui: {widget: 'custom'}
|
||||
ui: { widget: 'custom' }
|
||||
},
|
||||
subtotal: { type: 'number', title: '小计', default: 0, ui: { widget: 'custom' } as SFNumberWidgetSchema },
|
||||
appendFee: { type: 'number', title: '附加费', default: 0, ui: { widget: 'custom' } as SFNumberWidgetSchema },
|
||||
@ -643,6 +671,57 @@ export class SupplyManagementReleasePublishComponent implements OnInit {
|
||||
}
|
||||
};
|
||||
}
|
||||
getLimitvalue() {
|
||||
// 货物核载信息最大值
|
||||
// 货物运输费(小计)最大值
|
||||
const getlimitvaluesParms = [
|
||||
this.service.limitKeys.weight,
|
||||
this.service.limitKeys.volume,
|
||||
this.service.limitKeys.piece,
|
||||
this.service.limitKeys.maxDays,
|
||||
this.service.limitKeys.intervalDays,
|
||||
this.service.limitKeys.maxTimes
|
||||
];
|
||||
this.service.request(this.service.$api_findItemValueByItemKeys, getlimitvaluesParms).subscribe(res => {
|
||||
const maxWeight = res.filter((item: any) => item.itemKey === this.service.limitKeys.weight)[0].itemValue;
|
||||
const maxVolume = res.filter((item: any) => item.itemKey === this.service.limitKeys.volume)[0].itemValue;
|
||||
const maxPiece = res.filter((item: any) => item.itemKey === this.service.limitKeys.piece)[0].itemValue;
|
||||
const maxDays = res.filter((item: any) => item.itemKey === this.service.limitKeys.maxDays)[0].itemValue;
|
||||
const intervalDays = res.filter((item: any) => item.itemKey === this.service.limitKeys.intervalDays)[0].itemValue;
|
||||
const maxTimes = res.filter((item: any) => item.itemKey === this.service.limitKeys.maxTimes)[0].itemValue;
|
||||
this.limitValues = {
|
||||
maxWeight: Number(maxWeight),
|
||||
maxVolume: Number(maxVolume),
|
||||
maxPiece: Number(maxPiece),
|
||||
maxDays: Number(maxDays),
|
||||
intervalDays: Number(intervalDays),
|
||||
maxTimes: Number(maxTimes)
|
||||
};
|
||||
});
|
||||
}
|
||||
// 不可选择的时间
|
||||
disabledDateStart = (current: Date): boolean => {
|
||||
return differenceInCalendarDays(new Date(), current) > 0;
|
||||
};
|
||||
|
||||
/**
|
||||
* 自定义校验数据
|
||||
* @param val
|
||||
*/
|
||||
customValidator(val: number) {
|
||||
if (this.isEmpty(val)) {
|
||||
return [{ keyword: 'required', message: '不能为空' }];
|
||||
} else {
|
||||
if (val <= 0) {
|
||||
return [{ keyword: 'required', message: '数值需大于0' }];
|
||||
}
|
||||
return [];
|
||||
}
|
||||
}
|
||||
|
||||
isEmpty(val: any) {
|
||||
return val === undefined || val === null || val.toString().trim() === '';
|
||||
}
|
||||
// 获取城市列表
|
||||
getRegionCode(regionCode: any) {
|
||||
console.log(regionCode);
|
||||
@ -663,37 +742,40 @@ export class SupplyManagementReleasePublishComponent implements OnInit {
|
||||
}
|
||||
payChange() {
|
||||
const prePay = this.sf7.value.prePay || 0;
|
||||
const toPay = this.sf7.value.toPay || 0
|
||||
const toPay = this.sf7.value.toPay || 0;
|
||||
const receiptPay = this.sf7.value.receiptPay || 0;
|
||||
// const oilCardPay = 0;
|
||||
const oilCardPay = 0;
|
||||
const subtotal = prePay + toPay + receiptPay;
|
||||
const params = {
|
||||
shipperId: this.envCache?.enterpriseId,
|
||||
enterpriseInfoId: this.envCache?.networkTransporterId,
|
||||
totalFreight:subtotal,
|
||||
// fuelCardAmount:oilCardPay,
|
||||
resourcetype:'1'
|
||||
}
|
||||
this.service
|
||||
.request(this.service.$api_getCalculatedSurcharge,params)
|
||||
.subscribe(res => {
|
||||
if (res) {
|
||||
this.sf7.setValue('/appendFee', res.surcharge);
|
||||
this.sf7.setValue('/subtotal', subtotal);
|
||||
this.sf7.setValue('/total', subtotal + res.surcharge);
|
||||
this.service
|
||||
.request(this.service.$api_getcalculatedServiceRate + `?invoiceAmount=${subtotal + res.surcharge}&totalFreight=${subtotal}`)
|
||||
.subscribe(res => {
|
||||
if (res) {
|
||||
this.currentRate = res.rate * 100;
|
||||
} else {
|
||||
this.service.msgSrv.error(res.msg);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
this.service.msgSrv.error(res.msg);
|
||||
}
|
||||
});
|
||||
shipperId: this?.sf1.value?.shipperAppUserId,
|
||||
enterpriseInfoId: this?.sf1.value?.enterpriseInfoName || '',
|
||||
totalFreight: subtotal,
|
||||
fuelCardAmount: oilCardPay,
|
||||
resourcetype: '1'
|
||||
};
|
||||
this.service.request(this.service.$api_getCalculatedSurcharge, params).subscribe(res => {
|
||||
console.log('999');
|
||||
console.log(this?.sf1.value);
|
||||
if (res) {
|
||||
this.sf7.setValue('/appendFee', res.surcharge);
|
||||
this.sf7.setValue('/subtotal', subtotal);
|
||||
this.sf7.setValue('/total', subtotal + res.surcharge);
|
||||
this.service
|
||||
.request(
|
||||
this.service.$api_getAdditionalRate +
|
||||
`?shipperId=${this?.sf1.value?.shipperAppUserId || ''}&enterpriseInfoId=${
|
||||
this?.sf1.value?.enterpriseInfoName || ''
|
||||
}&resourcetype='1'`
|
||||
)
|
||||
.subscribe(res => {
|
||||
if (res) {
|
||||
this.currentRate = res.rate * 100;
|
||||
}
|
||||
});
|
||||
} else {
|
||||
this.service.msgSrv.error(res.msg);
|
||||
}
|
||||
});
|
||||
}
|
||||
// 添加 删除发货卸货地址
|
||||
addStartInfo() {
|
||||
@ -775,65 +857,136 @@ export class SupplyManagementReleasePublishComponent implements OnInit {
|
||||
this.validateForm1.controls[key].markAsDirty();
|
||||
this.validateForm1.controls[key].updateValueAndValidity();
|
||||
});
|
||||
this.sf1.validator({ emitError: true });
|
||||
this.sf3.validator({ emitError: true });
|
||||
this.sf4.validator({ emitError: true });
|
||||
this.sf5.validator({ emitError: true });
|
||||
this.sf6.validator({ emitError: true });
|
||||
this.sf7.validator({ emitError: true });
|
||||
if (this.validateForm1.invalid || !this.sf1.valid || !this.sf3.valid || !this.sf4.valid || !this.sf6.valid || !this.sf7.valid) {
|
||||
if (this.validateForm1.invalid || !this.sf3.valid || !this.sf4.valid || !this.sf5.valid || !this.sf6.valid || !this.sf7.valid) {
|
||||
this.service.msgSrv.warning('请完善必填项!');
|
||||
return;
|
||||
}
|
||||
if (this.validateForm1.value.loadingTime < new Date()) {
|
||||
this.service.msgSrv.warning('装货时间必须大于当前时间!');
|
||||
return;
|
||||
}
|
||||
if (this.validateForm1.value.loadingTime > this.validateForm1.value.unloadingTime) {
|
||||
this.service.msgSrv.warning('装货时间不能大于卸货时间!');
|
||||
return;
|
||||
}
|
||||
if (this.sf7.value.total <= 0) {
|
||||
this.service.msgSrv.warning('总费用不能为0!');
|
||||
return;
|
||||
}
|
||||
const num = (Number(this.validateForm1.value.unloadingTime) - Number(this.validateForm1.value.loadingTime)) / (24 * 60 * 60 * 1000);
|
||||
if (num > this.limitValues.maxDays) {
|
||||
this.service.msgSrv.error(`当前计划装卸货时间间隔已超出限定值【${this.limitValues.maxDays}天】`);
|
||||
return;
|
||||
}
|
||||
if (
|
||||
this.sf4.value.weight > this.limitValues.maxWeight ||
|
||||
this.sf4.value.volume > this.limitValues.maxVolume ||
|
||||
this.sf4.value.number > this.limitValues.maxPiece
|
||||
) {
|
||||
this.service.msgSrv.error(
|
||||
`当前货物核载信息已超出限定值【${this.limitValues.maxWeight}吨、${this.limitValues.maxVolume}方、${this.limitValues.maxPiece}件】`
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
||||
const modalRef = this.modalService.create({
|
||||
nzTitle: '运输协议',
|
||||
nzContent: TranAgreementComponent,
|
||||
nzWidth: 900,
|
||||
nzFooter: null
|
||||
});
|
||||
modalRef.afterClose.subscribe(result => {
|
||||
if (result) {
|
||||
this.submit(submitType);
|
||||
const getFreightParms = { carLengthKeys: this.sf4.value.carLength, km: this.totalDistance };
|
||||
this.service.request(this.service.$api_getFreight, getFreightParms).subscribe(res => {
|
||||
if (this.sf7.value.subtotal > res.maxPrice) {
|
||||
this.service.msgSrv.error(`运费过高,请调整录入`);
|
||||
return;
|
||||
} else if (this.sf7.value.subtotal > res.ewPrice) {
|
||||
this.modalService.confirm({
|
||||
nzTitle: '',
|
||||
nzContent: `您的录入的运费过高,可能会影响支付,请仔细确认`,
|
||||
nzOkText: '继续',
|
||||
nzCancelText: '取消',
|
||||
nzOnOk: () => {
|
||||
this.agreementConfirm(submitType);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
this.agreementConfirm(submitType);
|
||||
}
|
||||
});
|
||||
}
|
||||
// 提交
|
||||
submit(submitType: string): void {
|
||||
// 提交前协议弹窗
|
||||
agreementConfirm(submitType?: string) {
|
||||
//装卸货信息
|
||||
const LoadingList = this.startInfo.concat(this.endInfo);
|
||||
|
||||
// 货物信息
|
||||
const goodsInfoList = [
|
||||
const sf3Values = { ...this.sf3.value };
|
||||
if (sf3Values.goodsTypeName === '其它') {
|
||||
sf3Values.goodsName = sf3Values.goodsName1;
|
||||
delete sf3Values.goodsName1;
|
||||
}
|
||||
if (this.sf4.value.carModel.includes('999')) {
|
||||
this.sf4.value.carModel = ['999'];
|
||||
}
|
||||
if (this.sf4.value.carLength.includes('999')) {
|
||||
this.sf4.value.carLength = ['999'];
|
||||
}
|
||||
const goodsInfoVOList = [
|
||||
{
|
||||
...sf3Values,
|
||||
...this.sf4.value,
|
||||
...this.sf3.value,
|
||||
carModel: this.sf4.value.carModel.join(','),
|
||||
carLength: this.sf4.value.carLength.join(',')
|
||||
}
|
||||
];
|
||||
// 运费信息
|
||||
const expenseList = [
|
||||
{ expenseCode: 'PRE', expenseName: '预付', price: this.sf7.value.prePay, id: this.sf7data?.prePayId ? this.sf7data?.prePayId : '' },
|
||||
{ expenseCode: 'RECE', expenseName: '到付', price: this.sf7.value.toPay, id: this.sf7data?.toPayId ? this.sf7data?.toPayId : '' },
|
||||
{
|
||||
expenseCode: 'BACK',
|
||||
expenseName: '回单付',
|
||||
price: this.sf7.value.receiptPay,
|
||||
id: this.sf7data?.receiptPayId ? this.sf7data?.receiptPayId : ''
|
||||
}
|
||||
{ expenseCode: 'PRE', expenseName: '预付', price: this.sf7.value.prePay || 0, id: this.sf7data?.prePayId || '' },
|
||||
{ expenseCode: 'RECE', expenseName: '到付', price: this.sf7.value.toPay || 0, id: this.sf7data?.toPayId || '' },
|
||||
{ expenseCode: 'BACK', expenseName: '回单付', price: this.sf7.value.receiptPay || 0, id: this.sf7data?.receiptPayId || '' }
|
||||
];
|
||||
console.log(this.sf55?.value);
|
||||
// const params = {
|
||||
// id: '',
|
||||
// ...this.sf1.value,
|
||||
// unLoadingPlaceDTOList: LoadingList,
|
||||
// unloadingTime: format(this.validateForm1.value?.unloadingTime, 'yyyy-MM-dd HH:mm:ss'),
|
||||
// loadingTime: format(this.validateForm1.value?.loadingTime, 'yyyy-MM-dd HH:mm:ss'),
|
||||
// goodsInfoDTOList: goodsInfoList,
|
||||
// ...this.sf5.value,
|
||||
// ...this.sf6.value,
|
||||
// expenseDTOList: expenseList,
|
||||
// paymentDays: this.sf7.value?.paymentDays,
|
||||
// insuranceType:this.sf55?.value?.insuranceType,
|
||||
// };
|
||||
const params = {
|
||||
id: '',
|
||||
...this.sf1.value,
|
||||
unLoadingPlaceDTOList: LoadingList,
|
||||
unloadingTime: format(this.validateForm1.value.unloadingTime, 'yyyy-MM-dd HH:mm:ss'),
|
||||
loadingTime: format(this.validateForm1.value.loadingTime, 'yyyy-MM-dd HH:mm:ss'),
|
||||
goodsInfoDTOList: goodsInfoList,
|
||||
goodsInfoDTOList: goodsInfoVOList,
|
||||
...this.sf5.value,
|
||||
...this.sf6.value,
|
||||
expenseDTOList: expenseList,
|
||||
paymentDays: this.sf7.value.paymentDays,
|
||||
insuranceType:this.sf55.value.insuranceType,
|
||||
paymentDays: this.sf7.value.paymentDays
|
||||
};
|
||||
|
||||
console.log(params);
|
||||
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 {
|
||||
let reqUrl = this.service.$api_consignWhole;
|
||||
if (submitType) {
|
||||
if (submitType == 'assign') {
|
||||
@ -983,6 +1136,8 @@ export class SupplyManagementReleasePublishComponent implements OnInit {
|
||||
if (this.sf3data.goodsNameId) {
|
||||
this.sf3.setValue('/goodsNameId', this.sf3data.goodsNameId);
|
||||
}
|
||||
} else {
|
||||
this.service.msgSrv.error(res.msg);
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -990,87 +1145,61 @@ export class SupplyManagementReleasePublishComponent implements OnInit {
|
||||
goBack() {
|
||||
window.history.go(-1);
|
||||
}
|
||||
// 装卸货地址互换
|
||||
swapAddress(){
|
||||
this.startInfo.forEach((element:any, index:any) => {
|
||||
this.validateForm1.removeControl(`loadAddress${index}`);
|
||||
this.validateForm1.removeControl(`loadName${index}`);
|
||||
this.validateForm1.removeControl(`loadPhone${index}`);
|
||||
});
|
||||
this.endInfo.forEach((element:any, index:any) => {
|
||||
this.validateForm1.removeControl(`unloadAddress${index}`);
|
||||
this.validateForm1.removeControl(`unloadName${index}`);
|
||||
this.validateForm1.removeControl(`unloadPhone${index}`);
|
||||
});
|
||||
|
||||
let item = this.startInfo;
|
||||
this.startInfo = this.endInfo;
|
||||
this.endInfo = item;
|
||||
|
||||
this.startInfo.forEach((element:any,index:any) => {
|
||||
element.type = '1';
|
||||
this.validateForm1.addControl(`loadAddress${index}`, new FormControl(null, Validators.required));
|
||||
this.validateForm1.addControl(`loadName${index}`, new FormControl(null, Validators.required));
|
||||
this.validateForm1.addControl(`loadPhone${index}`, new FormControl(null, [Validators.required, Validators.pattern('^[0-9]*$')]));
|
||||
});
|
||||
this.endInfo.forEach((element:any,index:any) => {
|
||||
element.type = '2';
|
||||
this.validateForm1.addControl(`unloadAddress${index}`, new FormControl(null, Validators.required));
|
||||
this.validateForm1.addControl(`unloadName${index}`, new FormControl(null, Validators.required));
|
||||
this.validateForm1.addControl(`unloadPhone${index}`, new FormControl(null, [Validators.required, Validators.pattern('^[0-9]*$')]));
|
||||
});
|
||||
|
||||
// 计算里程,时间
|
||||
if (this.startInfo[0]?.area && this.endInfo[0]?.area) {
|
||||
// 装卸货地址互换
|
||||
swapAddress() {
|
||||
this.startInfo.forEach((element: any, index: any) => {
|
||||
this.validateForm1.removeControl(`loadAddress${index}`);
|
||||
this.validateForm1.removeControl(`loadName${index}`);
|
||||
this.validateForm1.removeControl(`loadPhone${index}`);
|
||||
});
|
||||
this.endInfo.forEach((element: any, index: any) => {
|
||||
this.validateForm1.removeControl(`unloadAddress${index}`);
|
||||
this.validateForm1.removeControl(`unloadName${index}`);
|
||||
this.validateForm1.removeControl(`unloadPhone${index}`);
|
||||
});
|
||||
|
||||
let item = this.startInfo;
|
||||
this.startInfo = this.endInfo;
|
||||
this.endInfo = item;
|
||||
|
||||
this.startInfo.forEach((element: any, index: any) => {
|
||||
element.type = '1';
|
||||
this.validateForm1.addControl(`loadAddress${index}`, new FormControl(null, Validators.required));
|
||||
this.validateForm1.addControl(`loadName${index}`, new FormControl(null, Validators.required));
|
||||
this.validateForm1.addControl(`loadPhone${index}`, new FormControl(null, [Validators.required, Validators.pattern('^[0-9]*$')]));
|
||||
});
|
||||
this.endInfo.forEach((element: any, index: any) => {
|
||||
element.type = '2';
|
||||
this.validateForm1.addControl(`unloadAddress${index}`, new FormControl(null, Validators.required));
|
||||
this.validateForm1.addControl(`unloadName${index}`, new FormControl(null, Validators.required));
|
||||
this.validateForm1.addControl(`unloadPhone${index}`, new FormControl(null, [Validators.required, Validators.pattern('^[0-9]*$')]));
|
||||
});
|
||||
// 计算里程,时间
|
||||
if (this.startInfo[0]?.area && this.endInfo[0]?.area) {
|
||||
this.amapService.drivingCompute([...this.startInfo], [...this.endInfo]).subscribe(res => {
|
||||
this.totalDistance = res.distance;
|
||||
this.totalTime = res.time;
|
||||
this.getInsurersPrice(); //计算保费金额
|
||||
});
|
||||
}
|
||||
}
|
||||
goodsValuesChange(value: any) {
|
||||
console.log(value);
|
||||
console.log(this.totalDistance);
|
||||
|
||||
if(value >= 50000 && this.totalDistance > 0){
|
||||
const params = {
|
||||
goodsValue: value,
|
||||
insuranceType: this.sf55.value.insuranceType,
|
||||
km: this.totalDistance
|
||||
};
|
||||
this.service
|
||||
.request(this.service.$api_getWholeInsuranceInfo, params)
|
||||
.subscribe(res => {
|
||||
if (res) {
|
||||
this.sf5.setValue('/insurancePremium',res.insurancePremium);
|
||||
}else{
|
||||
this.sf5.setValue('/insurancePremium',null);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
getInsurersPrice() {
|
||||
console.log(this.sf5.value.goodsValue)
|
||||
console.log(this.sf5.value.insuranceType)
|
||||
if (this.sf5.value.goodsValue >= 50000) {
|
||||
if(this.totalDistance <=0){
|
||||
this.service.msgSrv.warning('当前装卸货距离为0,无法计算保价费金额');
|
||||
return;
|
||||
}
|
||||
// 计算保价费金额
|
||||
getInsurersPrice(insuranceType = this.sf5.value.insuranceType) {
|
||||
if (this.sf5.value.goodsValue >= 50000 && this.totalDistance > 0) {
|
||||
const params = {
|
||||
insuranceType,
|
||||
goodsValue: this.sf5.value.goodsValue,
|
||||
km: this.totalDistance
|
||||
};
|
||||
this.service.request(this.service.$api_getWholeInsuranceInfo, params).subscribe(res => {
|
||||
if (res) {
|
||||
this.sf5.setValue('/insurancePremium', res.insurancePremium);
|
||||
this.sf5.setValue('/insuranceRate', res.insuranceRate);
|
||||
} else {
|
||||
this.sf5.setValue('/insurancePremium', null);
|
||||
this.sf5.setValue('/insuranceRate', null);
|
||||
}
|
||||
const params = {
|
||||
goodsValue: this.sf5.value.goodsValue,
|
||||
insuranceType: this.sf5.value.insuranceType,
|
||||
km: this.totalDistance
|
||||
};
|
||||
this.service.request(this.service.$api_getWholeInsuranceInfo, params).subscribe(res => {
|
||||
if (res) {
|
||||
this.sf5.setValue('/insurancePremium', res.insurancePremium);
|
||||
this.sf5.setValue('/insuranceRate', res.insuranceRate);
|
||||
} else {
|
||||
this.sf5.setValue('/insurancePremium', null);
|
||||
this.sf5.setValue('/insuranceRate', null);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
<h2 style="text-align: center;">
|
||||
{{ agreement?.agreementName }}
|
||||
<div [innerHTML]="agreement | safehtml"></div>
|
||||
</h2>
|
||||
<div *nzModalFooter>
|
||||
<button nz-button nzType="primary" (click)="handleOk()" >我已阅读并同意签署</button>
|
||||
|
||||
@ -1,10 +1,20 @@
|
||||
/*
|
||||
* @Description :
|
||||
* @Version : 1.0
|
||||
* @Author : Shiming
|
||||
* @Date : 2022-02-24 20:19:51
|
||||
* @LastEditors : Shiming
|
||||
* @LastEditTime : 2022-02-28 20:55:59
|
||||
* @FilePath : \\tms-obc-web\\src\\app\\routes\\supply-management\\components\\tran-agreement\\tran-agreement.component.ts
|
||||
* Copyright (C) 2022 huzhenhong. All rights reserved.
|
||||
*/
|
||||
/*
|
||||
* @Description :
|
||||
* @Version : 1.0
|
||||
* @Author : Shiming
|
||||
* @Date : 2022-01-06 15:01:40
|
||||
* @LastEditors : Shiming
|
||||
* @LastEditTime : 2022-02-24 16:24:32
|
||||
* @LastEditTime : 2022-02-28 20:55:07
|
||||
* @FilePath : \\tms-obc-web\\src\\app\\routes\\supply-management\\components\\tran-agreement\\tran-agreement.component.ts
|
||||
* Copyright (C) 2022 huzhenhong. All rights reserved.
|
||||
*/
|
||||
@ -18,16 +28,37 @@ import { SupplyManagementService } from '../../services/supply-management.servic
|
||||
styleUrls: ['./tran-agreement.component.less']
|
||||
})
|
||||
export class TranAgreementComponent {
|
||||
|
||||
Object: any;
|
||||
agreement:any;
|
||||
constructor(private modal: NzModalRef,public service: SupplyManagementService,) {
|
||||
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
this.service.request(this.service.$api_getAgreementInfoByType,{type:'6'}).subscribe((res) => {
|
||||
console.log(Object)
|
||||
const params = {
|
||||
contractType:'1',
|
||||
parametersDTO: {
|
||||
// 回单付
|
||||
back: 'dsfgffdsg',
|
||||
// 发货地址
|
||||
consignorAddress: 'gfdgdfdg',
|
||||
// 发货时间
|
||||
consignorDate: 'dsggdsgsfgds',
|
||||
// 发货时间
|
||||
// consignorDate: '',
|
||||
|
||||
},
|
||||
resourceType: '1',
|
||||
signingObject: '1',
|
||||
templateType: 'MX',
|
||||
}
|
||||
console.log(params)
|
||||
|
||||
this.service.request(this.service.$api_getContractContent,params).subscribe((res) => {
|
||||
if (res) {
|
||||
this.agreement = res;
|
||||
|
||||
this.agreement = res.contractContent;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@ -79,6 +79,10 @@ export class SupplyManagementUpdatePriceComponent implements OnInit {
|
||||
spanLabelFixed: 100,
|
||||
grid: { span: 16 },
|
||||
},
|
||||
'$rule': {
|
||||
spanLabelFixed: 120,
|
||||
grid: { span: 16 },
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@ -7,31 +7,55 @@
|
||||
</ng-template>
|
||||
<ng-template #headerContent>
|
||||
<div class="mb-xs" nz-row>
|
||||
<button nz-button nzType="primary" nzSize="small" nzDanger>{{i?.resourceStatusLabel}}</button>
|
||||
<button nz-button nzType="primary" nzSize="small" nzDanger>{{ i?.resourceStatusLabel }}</button>
|
||||
<h4 class="ml-md">货源编码 : {{ i?.resourceCode }}</h4>
|
||||
</div>
|
||||
<div nz-row>
|
||||
<div nz-col nzSpan="14" class="text-grey-darker">网络货运人:{{i?.enterpriseInfoName}}</div>
|
||||
<div nz-col nzSpan="14" class="text-grey-darker">网络货运人:{{ i?.enterpriseInfoName }}</div>
|
||||
<div nz-col nzSpan="10">
|
||||
<button nz-button (click)="cancleGoodsSource()" *ngIf="i?.resourceStatus === '1'" acl [acl-ability]="['SUPPLY-VEHICLE-DETAIL-cancelSupply']">取消货源</button>
|
||||
<button nz-button (click)="assignedCar(i)"
|
||||
*ngIf="i?.resourceStatus === '1' && i?.serviceType === '2'" acl [acl-ability]="['SUPPLY-VEHICLE-DETAIL-vehicleAnew']">重新指派</button>
|
||||
<button nz-button (click)="updateGoodsSource(i)" *ngIf="i?.resourceStatus === '1'" acl [acl-ability]="['SUPPLY-VEHICLE-DETAIL-changeSupply']">修改货源</button>
|
||||
<button nz-button nzType="primary" nzGhost (click)="nextOrder(i)" acl [acl-ability]="['SUPPLY-VEHICLE-DETAIL-vehiclePlaceOrder']">再下一单</button>
|
||||
<button
|
||||
nz-button
|
||||
(click)="cancleGoodsSource()"
|
||||
*ngIf="i?.resourceStatus === '1'"
|
||||
acl
|
||||
[acl-ability]="['SUPPLY-VEHICLE-DETAIL-cancelSupply']"
|
||||
>取消货源</button
|
||||
>
|
||||
<button
|
||||
nz-button
|
||||
(click)="assignedCar(i)"
|
||||
*ngIf="i?.resourceStatus === '1' && i?.serviceType === '2'"
|
||||
acl
|
||||
[acl-ability]="['SUPPLY-VEHICLE-DETAIL-vehicleAnew']"
|
||||
>重新指派</button
|
||||
>
|
||||
<button
|
||||
nz-button
|
||||
(click)="updateGoodsSource(i)"
|
||||
*ngIf="i?.resourceStatus === '1'"
|
||||
acl
|
||||
[acl-ability]="['SUPPLY-VEHICLE-DETAIL-changeSupply']"
|
||||
>修改货源</button
|
||||
>
|
||||
<button nz-button nzType="primary" nzGhost (click)="nextOrder(i)" acl [acl-ability]="['SUPPLY-VEHICLE-DETAIL-vehiclePlaceOrder']"
|
||||
>再下一单</button
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mt-sm mb-sm" nz-row>
|
||||
<div>
|
||||
<b>总费用:<span class="text-red-light text-md">{{i?.totalAmount | currency: '¥'}}</span></b>
|
||||
<b
|
||||
>总费用:<span class="text-red-light text-md">{{ i?.totalAmount | currency: '¥' }}</span></b
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
<nz-divider></nz-divider>
|
||||
<div sv-container *ngIf="i">
|
||||
<sv label="外部货源号">{{ i?.externalResourceCode }} </sv>
|
||||
<sv label="项目">{{i?.enterpriseProjectName}}</sv>
|
||||
<sv label="录单员">{{i?.createUserName}}/{{i?.createUserPhone}}</sv>
|
||||
<sv label="调度员">{{i?.dispatchName}}/{{i?.dispatchPhone}} </sv>
|
||||
<sv label="服务类型">{{i?.serviceTypeLabel}} </sv>
|
||||
<sv label="项目">{{ i?.enterpriseProjectName }}</sv>
|
||||
<sv label="录单员">{{ i?.createUserName }}/{{ i?.createUserPhone }}</sv>
|
||||
<sv label="调度员">{{ i?.dispatchName }}/{{ i?.dispatchPhone }} </sv>
|
||||
<sv label="服务类型">{{ i?.serviceTypeLabel }} </sv>
|
||||
</div>
|
||||
</ng-template>
|
||||
</page-header-wrapper>
|
||||
@ -39,46 +63,61 @@
|
||||
<div class="approval-status">
|
||||
<div style="width: 60%; margin: 0 auto">
|
||||
<nz-steps [nzLabelPlacement]="'vertical'">
|
||||
<nz-step [nzStatus]="i?.resourceStatus !== '1'?'finish':'process'" nzIcon="solution"
|
||||
[nzDescription]="i?.createAt" nzTitle="下单"></nz-step>
|
||||
<nz-step *ngIf="i?.resourceStatus === '1' || i?.resourceStatus === '2' "
|
||||
[nzStatus]="i?.resourceStatus=== '1'? 'wait':'finish'" nzIcon="file-done" [nzTitle]="'接单'"></nz-step>
|
||||
<nz-step nzStatus="finish" nzIcon="close-circle" nzTitle="取消货源" *ngIf="i?.resourceStatus === '3'"></nz-step>
|
||||
<nz-step
|
||||
[nzStatus]="i?.resourceStatus !== '1' ? 'finish' : 'process'"
|
||||
nzIcon="solution"
|
||||
[nzDescription]="i?.createAt"
|
||||
nzTitle="下单"
|
||||
[nzSubtitle]="i?.createTime"
|
||||
></nz-step>
|
||||
<nz-step
|
||||
*ngIf="i?.resourceStatus === '1' || i?.resourceStatus === '2'"
|
||||
[nzStatus]="i?.resourceStatus === '1' ? 'wait' : 'finish'"
|
||||
nzIcon="file-done"
|
||||
[nzTitle]="'接单'"
|
||||
[nzSubtitle]="i?.orderReceivingTime"
|
||||
></nz-step>
|
||||
<nz-step
|
||||
nzStatus="finish"
|
||||
nzIcon="close-circle"
|
||||
nzTitle="取消货源"
|
||||
*ngIf="i?.resourceStatus === '3'"
|
||||
[nzSubtitle]="i?.endTime"
|
||||
></nz-step>
|
||||
</nz-steps>
|
||||
</div>
|
||||
</div>
|
||||
</nz-card>
|
||||
|
||||
|
||||
<nz-card nzTitle="基本信息">
|
||||
<sv-container col="2">
|
||||
<sv-title>货物信息</sv-title>
|
||||
<ng-container *ngFor="let item of i?.goodsInfoVOList">
|
||||
<sv label="货物名称">
|
||||
{{item.goodsName}}
|
||||
</sv>
|
||||
<sv label="货物数量">
|
||||
{{item.weight}}吨,{{item.volume}}方,{{item.number}}件
|
||||
{{ item.goodsName }}
|
||||
</sv>
|
||||
<sv label="货物数量"> {{ item.weight }}吨,{{ item.volume }}方,{{ item.number }}件 </sv>
|
||||
</ng-container>
|
||||
</sv-container>
|
||||
<sv-container class="mt-md">
|
||||
<sv-title>承运信息</sv-title>
|
||||
<sv label="司机姓名">
|
||||
{{i?.carrierInformationVO?.driverName}}
|
||||
{{ i?.carrierInformationVO?.driverName }}
|
||||
</sv>
|
||||
<sv label="手机号">
|
||||
{{i?.carrierInformationVO?.driverTelephone}}
|
||||
{{ i?.carrierInformationVO?.driverTelephone }}
|
||||
</sv>
|
||||
<sv label="车牌号">
|
||||
{{i?.carrierInformationVO?.driverLicensePlate}}
|
||||
{{ i?.carrierInformationVO?.driverLicensePlate }}
|
||||
</sv>
|
||||
</sv-container>
|
||||
<div class="mt-md">
|
||||
<h4 class="text-md">装货卸货信息
|
||||
<span class="ml-sm text-sm">(
|
||||
<label>{{i?.loadingCount}}装</label>
|
||||
<label>{{i?.unloadingCount}}卸</label>
|
||||
<h4 class="text-md"
|
||||
>装货卸货信息
|
||||
<span class="ml-sm text-sm"
|
||||
>(
|
||||
<label>{{ i?.loadingCount }}装</label>
|
||||
<label>{{ i?.unloadingCount }}卸</label>
|
||||
)
|
||||
</span>
|
||||
</h4>
|
||||
@ -89,12 +128,12 @@
|
||||
<div *ngIf="item?.type === '1'" class="loading-row">
|
||||
<div class="handling-info-icon loading-bg">装</div>
|
||||
<div class="info">
|
||||
<h4>装货地:{{item?.province}}{{item?.city}}{{item?.area}}{{item?.detailedAddress}}</h4>
|
||||
<p>联系人:{{item?.appUserName}}/{{item?.contractTelephone}}</p>
|
||||
<h4>装货地:{{ item?.province }}{{ item?.city }}{{ item?.area }}{{ item?.detailedAddress }}</h4>
|
||||
<p>联系人:{{ item?.appUserName }}/{{ item?.contractTelephone }}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<p class="time-info">装货时间:{{i?.loadingTime}}</p>
|
||||
<p class="time-info">装货时间:{{ i?.loadingTime }}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div nz-col [nzSpan]="12">
|
||||
@ -103,12 +142,12 @@
|
||||
<div *ngIf="item?.type === '2'" class="loading-row">
|
||||
<div class="handling-info-icon unloaing-bg">卸</div>
|
||||
<div class="info">
|
||||
<h4>卸货地:{{item?.province}}{{item?.city}}{{item?.area}}{{item?.detailedAddress}}</h4>
|
||||
<p>联系人:{{item?.appUserName}}/{{item?.contractTelephone}}</p>
|
||||
<h4>卸货地:{{ item?.province }}{{ item?.city }}{{ item?.area }}{{ item?.detailedAddress }}</h4>
|
||||
<p>联系人:{{ item?.appUserName }}/{{ item?.contractTelephone }}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<p class="time-info">卸货时间:{{i?.unloadingTime}}</p>
|
||||
<p class="time-info">卸货时间:{{ i?.unloadingTime }}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -118,27 +157,25 @@
|
||||
<nz-card nzTitle="服务信息">
|
||||
<sv-container>
|
||||
<sv label="增值服务套餐">
|
||||
{{i?.insuranceTypeLabel}}
|
||||
{{ i?.insuranceTypeLabel }}
|
||||
</sv>
|
||||
<sv label="货物价值">
|
||||
{{i?.goodsValue |currency}}
|
||||
</sv>
|
||||
<sv label="保价费金额">
|
||||
{{i?.insurancePremium |currency}} 元
|
||||
{{ i?.goodsValue | currency }}
|
||||
</sv>
|
||||
<sv label="保价费金额"> {{ i?.insurancePremium | currency }} 元 </sv>
|
||||
</sv-container>
|
||||
</nz-card>
|
||||
<nz-card [nzTitle]="'运费信息(到货后'+i?.paymentDays+'天内支付运费)'">
|
||||
<st [data]="i?.expenseVOList" [columns]="expenseColumns" [page]="{show:false}">
|
||||
<nz-card [nzTitle]="'运费信息(到货后' + i?.paymentDays + '天内支付运费)'">
|
||||
<st [data]="i?.expenseVOList" [columns]="expenseColumns" [page]="{ show: false }">
|
||||
<ng-template st-row="total" let-item>
|
||||
<div>
|
||||
{{item?.totalAmount | currency}}
|
||||
{{ item?.totalAmount | currency }}
|
||||
<span>(含附加费)</span>
|
||||
</div>
|
||||
</ng-template>
|
||||
<ng-template st-row="price" let-item>
|
||||
<div>
|
||||
{{item?.price | currency}}
|
||||
{{ item?.price | currency }}
|
||||
</div>
|
||||
</ng-template>
|
||||
</st>
|
||||
@ -147,9 +184,9 @@
|
||||
<h3>
|
||||
<label>总计 :</label>
|
||||
<span class="text-error-dark text-xl">
|
||||
{{(i?.totalAmount) | currency}}
|
||||
{{ i?.totalAmount | currency }}
|
||||
</span>
|
||||
<span>(运费{{i?.totalFreight | currency}}含附加运费 {{i?.totalSurcharge| currency}})</span>
|
||||
<span>(运费{{ i?.totalFreight | currency }}含附加运费 {{ i?.totalSurcharge | currency }})</span>
|
||||
</h3>
|
||||
<div>收款人:{{ i?.payeeName }}/{{ i?.payeePhone }}/{{ i?.payeeCardNo }}</div>
|
||||
</div>
|
||||
@ -158,24 +195,27 @@
|
||||
<nz-card nzTitle="补充信息">
|
||||
<sv-container>
|
||||
<sv label="是否回单">
|
||||
{{i?.supplementaryInformationVO?.stateReceipt?'是':'否'}}
|
||||
{{ i?.supplementaryInformationVO?.stateReceipt ? '是' : '否' }}
|
||||
</sv>
|
||||
<sv label="回单类型">
|
||||
{{ i?.supplementaryInformationVO?.receiptType === '1' ? '电子回单' : '纸质回单' }}
|
||||
</sv>
|
||||
<sv label="所在地区">
|
||||
{{i?.supplementaryInformationVO?.area}}
|
||||
{{ i?.supplementaryInformationVO?.area }}
|
||||
</sv>
|
||||
<sv label="详细地址">
|
||||
{{i?.supplementaryInformationVO?.address}}
|
||||
{{ i?.supplementaryInformationVO?.address }}
|
||||
</sv>
|
||||
<sv label="备注">
|
||||
{{i?.supplementaryInformationVO?.remarks}}
|
||||
{{ i?.supplementaryInformationVO?.remarks }}
|
||||
</sv>
|
||||
</sv-container>
|
||||
</nz-card>
|
||||
<nz-card nzTitle="操作日志">
|
||||
<st #st [data]="i?.auditRecordList" [columns]="logColumns" [ps]="0" [page]="{ show: false, showSize: false }">
|
||||
</st>
|
||||
<st #st [data]="service.$api_getOperationLogRecordsList" [columns]="logColumns"
|
||||
[page]="{ show: false, showSize: false }"
|
||||
[req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' }, params: reqParams }"
|
||||
[res]="{ reName: { list: 'data.records', total: 'data.total' } }">
|
||||
</st>
|
||||
</nz-card>
|
||||
</div>
|
||||
|
||||
@ -17,15 +17,15 @@ export class SupplyManagementVehicleDetailComponent implements OnInit {
|
||||
|
||||
id = this.route.snapshot.params.id;
|
||||
i: any;
|
||||
logColumns: STColumn[] = [
|
||||
{ title: '内容', index: 'theme' },
|
||||
{ title: '操作人', index: 'operationUserPhone' },
|
||||
{ title: '操作时间', index: ' createTime' },
|
||||
];
|
||||
serviceType: any = {
|
||||
1: '抢单',
|
||||
2: '指派'
|
||||
}
|
||||
logColumns: STColumn[] = [
|
||||
{ title: '内容', index: 'operationContent' },
|
||||
{ title: '操作人', index: 'operator' },
|
||||
{ title: '操作时间', index: 'operatorTimestamp' },
|
||||
];
|
||||
totalObj: any;
|
||||
attObj: any;
|
||||
status: any = { 1: '待接单', 2: '已接单', 3: '已取消' };
|
||||
@ -50,11 +50,16 @@ export class SupplyManagementVehicleDetailComponent implements OnInit {
|
||||
render: 'price'
|
||||
},
|
||||
];
|
||||
|
||||
get reqParams() {
|
||||
return {
|
||||
operateObject: this.i?.resourceCode,
|
||||
operateType: 4,
|
||||
};
|
||||
}
|
||||
constructor(
|
||||
private route: ActivatedRoute,
|
||||
private msgSrv: NzMessageService,
|
||||
private service: SupplyManagementService,
|
||||
public service: SupplyManagementService,
|
||||
public modal: NzModalService,
|
||||
public router: Router
|
||||
) {
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
* @Author : Shiming
|
||||
* @Date : 2022-01-12 10:52:50
|
||||
* @LastEditors : Shiming
|
||||
* @LastEditTime : 2022-02-25 15:22:22
|
||||
* @LastEditTime : 2022-03-01 13:12:12
|
||||
* @FilePath : \\tms-obc-web\\src\\app\\routes\\supply-management\\components\\vehicle\\vehicle.component.html
|
||||
* Copyright (C) 2022 huzhenhong. All rights reserved.
|
||||
-->
|
||||
@ -31,8 +31,8 @@
|
||||
[acl-ability]="['SUPPLY-INDEX-vehicleSearch']"
|
||||
>查询</button
|
||||
>
|
||||
<button nz-button nzType="primary" [nzLoading]="loading">导出</button>
|
||||
<button nz-button [nzLoading]="loading" (click)="resetSF()">重置</button>
|
||||
<button nz-button nzType="primary" [disabled]="loading">导出</button>
|
||||
<button nz-button [disabled]="loading" (click)="resetSF()">重置</button>
|
||||
<button nz-button nzType="link" (click)="expandToggle()">
|
||||
{{ !_$expand ? '展开' : '收起' }}
|
||||
<i nz-icon [nzType]="!_$expand ? 'down' : 'up'"></i>
|
||||
@ -71,6 +71,9 @@
|
||||
[loading]="loading"
|
||||
[scroll]="{ x: '1200px', y: '500px' }"
|
||||
>
|
||||
<ng-template st-row="createUserName" let-item let-index="index">
|
||||
<div> {{ item?.createUserName }}/{{ item?.createUserPhone }} </div>
|
||||
</ng-template>
|
||||
<ng-template st-row="resourceCode" let-item let-index="index">
|
||||
<a [routerLink]="'vehicle-detail/' + item?.id">{{ item?.resourceCode }}</a>
|
||||
<p>{{ item?.resourceTypeLabel }}{{ item?.serviceTypeLabel }}</p>
|
||||
|
||||
@ -8,9 +8,9 @@ import { map } from 'rxjs/operators';
|
||||
import { SupplyManagementService } from '../../services/supply-management.service';
|
||||
import { SupplyManagementVehicleAssignedCarComponent } from '../assigned-car/assigned-car.component';
|
||||
import { SupplyManagementUpdateExternalSnComponent } from '../update-external-sn/update-external-sn.component';
|
||||
import { SupplyManagementUpdateFreightComponent } from '../update-freight/update-freight.component';
|
||||
import { of } from 'rxjs';
|
||||
import { ShipperBaseService } from '@shared';
|
||||
import { SupplyManagementImportSupplyComponent } from '../../model/import-supply/import-supply.component';
|
||||
|
||||
@Component({
|
||||
selector: 'app-supply-management-vehicle',
|
||||
@ -21,7 +21,7 @@ export class SupplyManagementVehicleComponent implements OnInit {
|
||||
@ViewChild('st') private readonly st!: STComponent;
|
||||
@ViewChild('sf', { static: false }) sf!: SFComponent;
|
||||
@ViewChild('sfFre', { static: false }) sfFre!: SFComponent;
|
||||
loading:boolean = true;
|
||||
loading: boolean = true;
|
||||
schema: SFSchema = this.initSF();
|
||||
columns: STColumn[] = this.initST();
|
||||
_$expand = false;
|
||||
@ -58,7 +58,7 @@ export class SupplyManagementVehicleComponent implements OnInit {
|
||||
if (this.resourceStatus) {
|
||||
a.resourceStatus = this.resourceStatus;
|
||||
}
|
||||
this.loading = true
|
||||
this.loading = true;
|
||||
return {
|
||||
...a
|
||||
};
|
||||
@ -81,13 +81,13 @@ export class SupplyManagementVehicleComponent implements OnInit {
|
||||
return requestOptions;
|
||||
};
|
||||
afterRes = (data: any[], rawData?: any) => {
|
||||
this.loading = false
|
||||
this.loading = false;
|
||||
return data.map(item => ({
|
||||
...item,
|
||||
disabled: item.auditStatus !== '1',
|
||||
disabled: item.auditStatus !== '1'
|
||||
}));
|
||||
};
|
||||
|
||||
|
||||
get selectedRows() {
|
||||
return this.st?.list.filter(item => item.checked) || [];
|
||||
}
|
||||
@ -148,40 +148,24 @@ export class SupplyManagementVehicleComponent implements OnInit {
|
||||
}, 500);
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑外部货源号
|
||||
* @param item st当前行对象
|
||||
*/
|
||||
editEnternalSn(item: any) {
|
||||
const modalRef = this.modal.create({
|
||||
nzWidth: '400px',
|
||||
nzContent: SupplyManagementUpdateExternalSnComponent,
|
||||
nzComponentParams: {
|
||||
orderObject: item
|
||||
},
|
||||
nzFooter: null,
|
||||
nzClosable: false
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 导入货源
|
||||
*/
|
||||
importGoodsSource() {}
|
||||
|
||||
/**
|
||||
* 修改运费
|
||||
*/
|
||||
updateFreight(item: any) {
|
||||
importGoodsSource() {
|
||||
const modalRef = this.modal.create({
|
||||
nzTitle: '修改运费',
|
||||
nzWidth: '40%',
|
||||
nzContent: SupplyManagementUpdateFreightComponent,
|
||||
nzTitle: '货源导入',
|
||||
nzWidth: 600,
|
||||
nzContent: SupplyManagementImportSupplyComponent,
|
||||
nzComponentParams: {
|
||||
i: item
|
||||
// i: item
|
||||
},
|
||||
nzFooter: null
|
||||
});
|
||||
modalRef.afterClose.subscribe(result => {
|
||||
if (result) {
|
||||
this.st.reload();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
@ -243,9 +227,7 @@ export class SupplyManagementVehicleComponent implements OnInit {
|
||||
* 审核通过按钮
|
||||
*/
|
||||
handleOK(value: any) {
|
||||
console.log(this.sfFre.valid);
|
||||
console.log(this.sfFre.value);
|
||||
if (this.selectedRows.length <= 0) {
|
||||
if (this.auditMany === false) {
|
||||
const params: any = {
|
||||
id: this.auditID,
|
||||
remarks: this.sfFre.value.remarks
|
||||
@ -255,6 +237,7 @@ export class SupplyManagementVehicleComponent implements OnInit {
|
||||
} else {
|
||||
params.auditStatus = 3;
|
||||
}
|
||||
console.log('999');
|
||||
console.log(params);
|
||||
this.service.request(this.service.$api_goodsResourceAudit, params).subscribe(res => {
|
||||
if (res === true) {
|
||||
@ -378,10 +361,10 @@ export class SupplyManagementVehicleComponent implements OnInit {
|
||||
},
|
||||
allowClear: true,
|
||||
onSearch: (q: any) => {
|
||||
console.log(q);
|
||||
if (!!q) {
|
||||
let str = q.replace(/^\s+|\s+$/g, '');
|
||||
if (str) {
|
||||
return this.service
|
||||
.request(this.service.$api_enterpriceList, { enterpriseName: q })
|
||||
.request(this.service.$api_enterpriceList, { enterpriseName: str })
|
||||
.pipe(map((res: any) => (res as any[]).map(i => ({ label: i.enterpriseName, value: i.id } as SFSchemaEnum))))
|
||||
.toPromise();
|
||||
} else {
|
||||
@ -493,12 +476,14 @@ export class SupplyManagementVehicleComponent implements OnInit {
|
||||
className: 'text-left',
|
||||
render: 'resourceCode'
|
||||
},
|
||||
{ title: '录单员', render: 'createUserName', width: '200px', className: 'text-left' },
|
||||
{
|
||||
title: '货主',
|
||||
index: 'shipperAppUserName',
|
||||
width: '180px',
|
||||
className: 'text-left'
|
||||
},
|
||||
|
||||
{
|
||||
title: '项目名称',
|
||||
index: 'enterpriseProjectName',
|
||||
@ -616,13 +601,13 @@ export class SupplyManagementVehicleComponent implements OnInit {
|
||||
click: _record => this.nextOrder(_record),
|
||||
acl: { ability: ['SUPPLY-INDEX-vehiclePlaceOrder'] }
|
||||
},
|
||||
{type: 'divider'},
|
||||
{
|
||||
text: '重新指派 ',
|
||||
click: _record => this.assignedCar(_record),
|
||||
iif: item => item.resourceStatus === '1' && item.serviceType === '2',
|
||||
acl: { ability: ['SUPPLY-INDEX-vehicleReassign'] }
|
||||
}
|
||||
},
|
||||
{ type: 'divider' }
|
||||
]
|
||||
}
|
||||
];
|
||||
|
||||
@ -0,0 +1,55 @@
|
||||
<!--
|
||||
* @Description :
|
||||
* @Version : 1.0
|
||||
* @Author : Shiming
|
||||
* @Date : 2021-12-03 11:10:14
|
||||
* @LastEditors : Shiming
|
||||
* @LastEditTime : 2022-03-02 20:29:46
|
||||
* @FilePath : \\tms-obc-web\\src\\app\\routes\\supply-management\\model\\import-supply\\import-supply.component.html
|
||||
* Copyright (C) 2022 huzhenhong. All rights reserved.
|
||||
-->
|
||||
<div *ngIf="status">
|
||||
<sf #sf mode="edit" [schema]="schema" [ui]="ui" button="none">
|
||||
<ng-template sf-template="fileName" let-me let-ui="ui" let-schema="schema">
|
||||
<nz-input-group [nzSuffix]="inputClearTpl">
|
||||
<input type="text" readonly nz-input [(ngModel)]="me.formProperty.value" placeholder="请上传文件" />
|
||||
</nz-input-group>
|
||||
<ng-template #inputClearTpl>
|
||||
<i nz-icon class="ant-input-clear-icon" nzTheme="fill" nzType="close-circle" *ngIf="me.formProperty.value"
|
||||
(click)="clearFile()"></i>
|
||||
</ng-template>
|
||||
</ng-template>
|
||||
<ng-template sf-template="file" let-me let-ui="ui" let-schema="schema">
|
||||
|
||||
<nz-upload [nzAction]="uploadUrl" [nzName]="'multipartFile'" [nzHeaders]="{ authorization: 'authorization-text' }"
|
||||
[(nzFileList)]="files"
|
||||
[nzAccept]="'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel'"
|
||||
(nzChange)="handleChange($event)" [nzShowUploadList]="false" [nzBeforeUpload]="beforeUpload" [nzLimit]="1">
|
||||
<div>
|
||||
<button nzType="primary" nz-button>
|
||||
<i nz-icon nzType="upload"></i>
|
||||
上传文件
|
||||
</button>
|
||||
</div>
|
||||
</nz-upload>
|
||||
<span style="color: #ff4d4f; font-size: 12px;margin-left: 10px; cursor: pointer;"
|
||||
(click)="downFile()">下载导入模板</span>
|
||||
<div style="color: #ff4d4f; font-size: 12px; margin-top: 5px; width: 400px">仅支持XLS / XLSX文件格式,最多不能超过100行数据</div>
|
||||
</ng-template>
|
||||
</sf>
|
||||
<div>
|
||||
<p class="mb-xs">注意:</p>
|
||||
<p class="mb-xs">1、第一次上传请点击下载模板</p>
|
||||
<p class="mb-xs">2、请不要调整模板顺序</p>
|
||||
<p class="mb-xs">3、必填字段请务必填写</p>
|
||||
<p class="mb-xs">4、如果不清楚字段值,请参考货源发布功能</p>
|
||||
<p class="mb-xs">5、发布成功后,可在货源列表-待接单查看</p>
|
||||
<div>
|
||||
</div>
|
||||
<div *ngIf="!status">
|
||||
文件上传成功!成功xx条,失败xx条!
|
||||
</div>
|
||||
<div class="modal-footer text-right">
|
||||
<button nz-button type="button" (click)="close()">取消</button>
|
||||
<button nz-button type="submit" nzType="primary" (click)="save()">确定</button>
|
||||
</div>
|
||||
@ -0,0 +1,24 @@
|
||||
import { waitForAsync, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
import { SupplyManagementImportSupplyComponent } from './import-supply.component';
|
||||
|
||||
describe('SupplyManagementImportSupplyComponent', () => {
|
||||
let component: SupplyManagementImportSupplyComponent;
|
||||
let fixture: ComponentFixture<SupplyManagementImportSupplyComponent>;
|
||||
|
||||
beforeEach(waitForAsync(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [ SupplyManagementImportSupplyComponent ]
|
||||
})
|
||||
.compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(SupplyManagementImportSupplyComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
||||
@ -0,0 +1,211 @@
|
||||
/*
|
||||
* @Description :
|
||||
* @Version : 1.0
|
||||
* @Author : Shiming
|
||||
* @Date : 2022-03-01 15:13:03
|
||||
* @LastEditors : Shiming
|
||||
* @LastEditTime : 2022-03-02 20:57:36
|
||||
* @FilePath : \\tms-obc-web\\src\\app\\routes\\supply-management\\model\\import-supply\\import-supply.component.ts
|
||||
* Copyright (C) 2022 huzhenhong. All rights reserved.
|
||||
*/
|
||||
import { Component, OnInit, ViewChild } from '@angular/core';
|
||||
import { STColumn } from '@delon/abc/st';
|
||||
import { SFComponent, SFSchema, SFSchemaEnum, SFSelectWidgetSchema, SFUISchema } from '@delon/form';
|
||||
import { _HttpClient } from '@delon/theme';
|
||||
import { NzMessageService } from 'ng-zorro-antd/message';
|
||||
import { NzModalRef } from 'ng-zorro-antd/modal';
|
||||
import { NzUploadChangeParam, NzUploadFile } from 'ng-zorro-antd/upload';
|
||||
import { Observable, Observer, of } from 'rxjs';
|
||||
import { map } from 'rxjs/operators';
|
||||
import { SupplyManagementService } from '../../services/supply-management.service';
|
||||
import { apiConf } from '@conf/api.conf';
|
||||
|
||||
@Component({
|
||||
selector: 'app-supply-management-import-supply',
|
||||
templateUrl: './import-supply.component.html',
|
||||
})
|
||||
export class SupplyManagementImportSupplyComponent implements OnInit {
|
||||
record: any = {};
|
||||
files: any;
|
||||
status: boolean = true
|
||||
files2: any;
|
||||
schema: SFSchema = {};
|
||||
ui: SFUISchema = {};
|
||||
fileName: any;
|
||||
uploadUrl = apiConf.file_upload_url;
|
||||
@ViewChild('sf', { static: false }) sf!: SFComponent;
|
||||
constructor(
|
||||
private modal: NzModalRef,
|
||||
private msgSrv: NzMessageService,
|
||||
public service: SupplyManagementService
|
||||
) { }
|
||||
|
||||
ngOnInit(): void {
|
||||
this.initSF();
|
||||
console.log(this.record)
|
||||
}
|
||||
|
||||
initSF() {
|
||||
this.schema = {
|
||||
properties: {
|
||||
shipperAppUserId: {
|
||||
title: '货主',
|
||||
type: 'string',
|
||||
maxLength: 30,
|
||||
ui: {
|
||||
widget: 'select',
|
||||
// serverSearch: true,
|
||||
searchDebounceTime: 300,
|
||||
searchLoadingText: '搜索中...',
|
||||
onSearch: (q: any) => {
|
||||
console.log(q === ' ')
|
||||
let str =q.replace(/^\s+|\s+$/g,"");
|
||||
if (str) {
|
||||
return this.service
|
||||
.request(this.service.$api_enterpriceList, { enterpriseName: str })
|
||||
.pipe(map(res => (res as any[]).map(i => ({ label: i.enterpriseName, value: i.id } as SFSchemaEnum))))
|
||||
.toPromise();
|
||||
} else {
|
||||
return of([]);
|
||||
}
|
||||
},
|
||||
change: (q: any) => {
|
||||
let str =q.replace(/^\s+|\s+$/g,"");
|
||||
if (str) {
|
||||
this.getRegionCode(str);
|
||||
this.getRegionCode2(str);
|
||||
}
|
||||
}
|
||||
} as SFSelectWidgetSchema
|
||||
},
|
||||
netTranName: {
|
||||
type: 'string',
|
||||
title: '网络货运人',
|
||||
ui: {
|
||||
widget: 'text',
|
||||
},
|
||||
default: '确认货主后带出'
|
||||
},
|
||||
enterpriseProjectId: {
|
||||
type: 'string',
|
||||
title: '项目',
|
||||
ui: {
|
||||
widget: 'select',
|
||||
placeholder: '请选择'
|
||||
} as SFSelectWidgetSchema
|
||||
},
|
||||
fileName: {
|
||||
type: 'string',
|
||||
title: '导入货源信息',
|
||||
ui: {
|
||||
widget: 'custom'
|
||||
}
|
||||
},
|
||||
file: {
|
||||
type: 'string',
|
||||
title: '',
|
||||
ui: {
|
||||
widget: 'custom'
|
||||
}
|
||||
},
|
||||
},
|
||||
required: ['shipperAppUserId', 'enterpriseProjectId','netTranName','fileName'],
|
||||
};
|
||||
this.ui = {
|
||||
'*': {
|
||||
spanLabelFixed: 130,
|
||||
grid: { span: 20 },
|
||||
},
|
||||
'$fileName': {
|
||||
spanLabelFixed: 130,
|
||||
grid: { span: 20 },
|
||||
},
|
||||
'$resourceCode': {
|
||||
spanLabelFixed: 130,
|
||||
grid: { span: 20 },
|
||||
},
|
||||
};
|
||||
}
|
||||
getRegionCode(regionCode: any) {
|
||||
console.log(regionCode);
|
||||
return this.service
|
||||
.request(this.service.$api_get_enterprise_project, { id: regionCode })
|
||||
.pipe(
|
||||
map(res =>
|
||||
res.map((item: any) => ({
|
||||
label: item.projectName,
|
||||
value: item.id
|
||||
}))
|
||||
)
|
||||
)
|
||||
.subscribe(res => {
|
||||
this.sf.getProperty('/enterpriseProjectId')!.schema.enum = res;
|
||||
this.sf.getProperty('/enterpriseProjectId')!.widget.reset(res);
|
||||
});
|
||||
}
|
||||
getRegionCode2(regionCode: any) {
|
||||
console.log(regionCode);
|
||||
return this.service
|
||||
.request(this.service.$api_getNetworkTransporter, { id: regionCode }).subscribe((res: any) => {
|
||||
console.log(res?.netTranName)
|
||||
console.log(res?.networkTransporter)
|
||||
this.sf.getProperty('/netTranName')!.widget.reset(res?.netTranName);
|
||||
this.sf.setValue('/netTranName', res?.netTranName)
|
||||
});
|
||||
}
|
||||
save(): void {
|
||||
console.log(this.sf.value)
|
||||
// this.service.request(this.service.$api_update_price, { id, freightType, freightPrice, resourceCode, rule, resourceId }).subscribe(res => {
|
||||
// if (res) {
|
||||
// this.msgSrv.success('保存成功');
|
||||
// this.modal.close(true);
|
||||
// }
|
||||
// });
|
||||
}
|
||||
|
||||
close(): void {
|
||||
this.modal.destroy();
|
||||
}
|
||||
handleChange(info: NzUploadChangeParam): void {
|
||||
switch (info?.file?.status) {
|
||||
case 'uploading':
|
||||
break;
|
||||
case 'done':
|
||||
let file = info?.file;
|
||||
let fileName = file?.response.name;
|
||||
this.sf?.setValue('/fileName', fileName);
|
||||
this.sf?.setValue('/file', file?.response?.url);
|
||||
break;
|
||||
case 'error':
|
||||
this.service.msgSrv.error('出错误了');
|
||||
break;
|
||||
}
|
||||
}
|
||||
beforeUpload = (file: NzUploadFile, _fileList: NzUploadFile[]) => {
|
||||
return new Observable((observer: Observer<boolean>) => {
|
||||
// const isJpgOrPng = file.type === 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet';
|
||||
// if (!isJpgOrPng) {
|
||||
// this.service.msgSrv.error('仅支持XLX / XLSX文件格式');
|
||||
// observer.complete();
|
||||
// return;
|
||||
// }
|
||||
// tslint:disable-next-line: no-non-null-assertion
|
||||
const isLt2M = file.size! / 1024 / 1024 < 3;
|
||||
if (!isLt2M) {
|
||||
this.service.msgSrv.warning('图片大小超过3兆!');
|
||||
observer.complete();
|
||||
return;
|
||||
}
|
||||
observer.next(isLt2M);
|
||||
observer.complete();
|
||||
});
|
||||
};
|
||||
clearFile() {
|
||||
this.fileName = null;
|
||||
this.sf?.setValue('/fileName', null);
|
||||
this.sf?.setValue('/file', null);
|
||||
}
|
||||
downFile() {
|
||||
this.service.downloadFile(this.service.$api_exportGoodsResourceOperateTemplate);
|
||||
}
|
||||
}
|
||||
@ -4,7 +4,7 @@
|
||||
* @Author : Shiming
|
||||
* @Date : 2021-12-03 11:10:14
|
||||
* @LastEditors : Shiming
|
||||
* @LastEditTime : 2022-02-28 11:31:44
|
||||
* @LastEditTime : 2022-03-02 14:27:18
|
||||
* @FilePath : \\tms-obc-web\\src\\app\\routes\\supply-management\\services\\supply-management.service.ts
|
||||
* Copyright (C) 2022 huzhenhong. All rights reserved.
|
||||
*/
|
||||
@ -54,6 +54,8 @@ export class SupplyManagementService extends BaseService {
|
||||
$api_getCalculatedSurcharge = `/api/sdc/expense/getCalculatedSurcharge`;
|
||||
// 整车计算附加费率
|
||||
$api_getcalculatedServiceRate = `/api/sdc/expense/getAdditionalRate`;
|
||||
// 整车计算附加费率
|
||||
$api_getAdditionalRate = `/api/sdc/expense/getAdditionalRate`;
|
||||
// 代发整车货源
|
||||
$api_consignWhole = `/api/sdc/goodsResourceOperate/consignWhole`;
|
||||
// 代发大宗货源
|
||||
@ -111,8 +113,12 @@ export class SupplyManagementService extends BaseService {
|
||||
public $api_getOperationLogRecordsList = '/api/mdc/pbc/operationLogRecords/getOperationLogRecordsList';
|
||||
// 获取数据字典
|
||||
$api_getDictValue = `/api/mdc/pbc/dictItems/getDictValue`;
|
||||
// 获取协议信息
|
||||
public $api_getAgreementInfoByType = '/api/mdc/pbc/agreementInfo/getAgreementInfoByType';
|
||||
// 获取协议信息
|
||||
public $api_getAgreementInfoByType = '/api/mdc/pbc/agreementInfo/getAgreementInfoByType';
|
||||
// 获取协议信息
|
||||
public $api_getContractContent = '/api/sdc/contractTemplate/getContractContent';
|
||||
// 获取运价
|
||||
public $api_getFreight = '/api/mdc/cuc/freightConfig/getFreight';
|
||||
/**
|
||||
* 获取车型、车长字典数据
|
||||
* @returns
|
||||
@ -132,6 +138,33 @@ export class SupplyManagementService extends BaseService {
|
||||
constructor(public injector: Injector) {
|
||||
super(injector);
|
||||
}
|
||||
public limitKeys = {
|
||||
weight:'sys.config.goods.approvalCarMaxWeight', //整车-核载重量上限
|
||||
volume:'sys.config.goods.approvalCarMaxVolume', //整车-核载体积上限
|
||||
piece:'sys.config.goods.approvalCarMaxPiece', //整车-核载件数上限
|
||||
maxDays:'sys.config.goods.wholeLoadingMaxDays', //整车-计划装货时间上限
|
||||
intervalDays:'sys.config.goods.wholeUnloadingIntervalDays', //计划装、卸货时间间隔
|
||||
maxTimes:'sys.config.goods.wholeLoadingMaxTimes', //整车-多装多卸地点上限
|
||||
}
|
||||
public limitKeys2 = {
|
||||
month:'sys.config.goods.bulkEndMaxMonth', //大宗-截止时间上限
|
||||
weight:'sys.config.goods.bulkMaxWeight', //大宗-重量上限
|
||||
volume:'sys.config.goods.bulkMaxVolume', //大宗-体积上限
|
||||
trainNumber:'sys.config.goods.bulkMaxTrainNumber', //大宗-车次上限
|
||||
freight:'sys.config.goods.bulkMaxUnitFreight', //大宗-运费单价上限
|
||||
}
|
||||
// 根据ItemKey获取项值
|
||||
public $api_findItemValueByItemKeys = '/api/mdc/pbc/sysConfigItem/findItemValueByItemKeys';
|
||||
// 获取保价费信息
|
||||
public $api_getWholeInsuranceInfo = '/api/sdc/goodsResourceShipper/getWholeInsuranceInfo';
|
||||
// 下载导入货源模板-运营后台
|
||||
public $api_exportGoodsResourceOperateTemplate = '/api/sdc/uploadGoodsResource/exportGoodsResourceOperateTemplate';
|
||||
// 导入货源-运营后台
|
||||
public $api_goodsResourceOperateImport = '/api/sdc/uploadGoodsResource/goodsResourceOperateImport';
|
||||
// 根据货主ID查询网络货运人信息
|
||||
public $api_getNetworkTransporter = '/api/mdc/cuc/enterpriseInfo/operate/getNetworkTransporter';
|
||||
$api_verify_vehicle_status = `/api/sdc/goodsResourceShipper/saveVerify`;// 发布货源校验司机/车队长的状态
|
||||
$api_get_sys_config = `/api/mdc/pbc/sysConfigItem/findConfigValues`; // 根据项key、业务id获取配置信息
|
||||
// 获取指派熟车列表
|
||||
$api_getListCars = '/api/mdc/cuc/enterpriseVehicle/getPracticeCarList';
|
||||
}
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
* @Author : Shiming
|
||||
* @Date : 2021-12-20 10:13:02
|
||||
* @LastEditors : Shiming
|
||||
* @LastEditTime : 2022-01-18 17:26:40
|
||||
* @LastEditTime : 2022-03-01 15:38:17
|
||||
* @FilePath : \\tms-obc-web\\src\\app\\routes\\supply-management\\supply-management.module.ts
|
||||
* Copyright (C) 2022 huzhenhong. All rights reserved.
|
||||
*/
|
||||
@ -35,6 +35,7 @@ import { SupplyManagementUpdateFreightComponent } from './components/update-frei
|
||||
import { SupplyManagementUpdatePriceComponent } from './components/update-price/update-price.component';
|
||||
import { SupplyManagementVehicleDetailComponent } from './components/vehicle-detail/vehicle-detail.component';
|
||||
import { SupplyManagementVehicleComponent } from './components/vehicle/vehicle.component';
|
||||
import { SupplyManagementImportSupplyComponent } from './model/import-supply/import-supply.component';
|
||||
import { SupplyManagementRoutingModule } from './supply-management-routing.module';
|
||||
|
||||
const COMPONENTS: Type<void>[] = [
|
||||
@ -61,7 +62,8 @@ const COMPONENTS: Type<void>[] = [
|
||||
SupplyManagementReleasePublishComponent,
|
||||
SupplyManagementBulkReleasePublishComponent,
|
||||
TranAgreementComponent,
|
||||
SupplyManagementBulkAssignedCarComponent
|
||||
SupplyManagementBulkAssignedCarComponent,
|
||||
SupplyManagementImportSupplyComponent
|
||||
];
|
||||
|
||||
@NgModule({
|
||||
|
||||
@ -159,10 +159,10 @@ export class CloseAccountComponent implements OnInit {
|
||||
searchDebounceTime: 300,
|
||||
searchLoadingText: '搜索中...',
|
||||
onSearch: (q: any) => {
|
||||
console.log(q)
|
||||
if (!!q) {
|
||||
let str =q.replace(/^\s+|\s+$/g,"");
|
||||
if (str) {
|
||||
return this.service
|
||||
.request(this.service.$api_enterpriceList, { enterpriseName: q})
|
||||
.request(this.service.$api_enterpriceList, { enterpriseName: str})
|
||||
.pipe(map((res: any) => (res as any[]).map((i) => ({ label: i.enterpriseName, value: i.id } as SFSchemaEnum))))
|
||||
.toPromise();
|
||||
} else {
|
||||
|
||||
@ -244,12 +244,12 @@ export class NetworkFreightComponent implements OnInit {
|
||||
ui: { placeholder: '请输入' }
|
||||
},
|
||||
invoiceTaxRate: {
|
||||
type: 'string',
|
||||
type: 'number',
|
||||
title: '发票税率',
|
||||
ui: { placeholder: '请输入' }
|
||||
},
|
||||
invoiceMaxAmount: {
|
||||
type: 'string',
|
||||
type: 'number',
|
||||
title: '发票面额上限',
|
||||
ui: { placeholder: '请输入' }
|
||||
},
|
||||
@ -326,7 +326,10 @@ export class NetworkFreightComponent implements OnInit {
|
||||
'drawer'
|
||||
]
|
||||
};
|
||||
this.ui3 = { '*': { spanLabelFixed: 120, grid: { span: 24 } } };
|
||||
this.ui3 = {
|
||||
'*': { spanLabelFixed: 120, grid: { span: 24 } },
|
||||
'$taxClassificationVersion': { spanLabelFixed: 150, grid: { span: 24 } },
|
||||
};
|
||||
}
|
||||
initSFTax() {
|
||||
this.TaxSchema = {
|
||||
@ -363,7 +366,7 @@ export class NetworkFreightComponent implements OnInit {
|
||||
ui: { placeholder: '请输入' }
|
||||
},
|
||||
invoiceTaxRate: {
|
||||
type: 'string',
|
||||
type: 'number',
|
||||
title: '发票税率',
|
||||
ui: { placeholder: '请输入' }
|
||||
},
|
||||
@ -574,7 +577,7 @@ export class NetworkFreightComponent implements OnInit {
|
||||
}
|
||||
// 新增
|
||||
creat(value?: any) {
|
||||
console.log(value)
|
||||
this.router.navigate(['./new/'+ value?.id], { relativeTo: this.ar });
|
||||
console.log(value);
|
||||
this.router.navigate(['./new/' + value?.id], { relativeTo: this.ar });
|
||||
}
|
||||
}
|
||||
|
||||
@ -148,12 +148,12 @@ export class NetworkFreightNewComponent implements OnInit {
|
||||
});
|
||||
}
|
||||
submitForm() {
|
||||
// if (!this.sf1.valid || !this.sf.valid) {
|
||||
// this.sf.validator({ emitError: true });
|
||||
// this.sf1.validator({ emitError: true });
|
||||
// this.service.msgSrv.warning('请修改填写错误信息');
|
||||
// return;
|
||||
// }
|
||||
if (!this.sf1.valid || !this.sf.valid) {
|
||||
this.sf.validator({ emitError: true });
|
||||
this.sf1.validator({ emitError: true });
|
||||
this.service.msgSrv.warning('请填写必填项!');
|
||||
return;
|
||||
}
|
||||
const enterpriseRegistrationTime = new Date(this.sf1.value.enterpriseRegistrationTime);
|
||||
const operatingStartTime = new Date(this.sf1.value.operatingStartTime);
|
||||
if (enterpriseRegistrationTime.getTime() > operatingStartTime.getTime()) {
|
||||
@ -584,7 +584,7 @@ export class NetworkFreightNewComponent implements OnInit {
|
||||
}
|
||||
}
|
||||
},
|
||||
required: ['certificatePhotoFront', 'certificatePhotoBack', 'name', 'certificateType', 'certificateNumber',]
|
||||
required: ['certificatePhotoFront', 'certificatePhotoBack', 'name', 'certificateType', 'certificateNumber','certificatePhotoFrontWatermark','certificatePhotoBackWatermark']
|
||||
}
|
||||
},
|
||||
required: [
|
||||
|
||||
@ -83,14 +83,11 @@ export class SettingRoleEditComponent implements OnInit {
|
||||
this.service.msgSrv.warning('校验错误');
|
||||
return;
|
||||
}
|
||||
// this.menu.washTree();
|
||||
// if (this.authorityAssistId.length === 0) {
|
||||
// this.service.msgSrv.warning('请选择权限!');
|
||||
// return;
|
||||
// }
|
||||
console.log(this.params);
|
||||
|
||||
const auths = this.menu?.washTree();
|
||||
if (auths.authorityAssistId.length === 0) {
|
||||
this.service.msgSrv.warning('请选择权限!');
|
||||
return;
|
||||
}
|
||||
const params: any = {
|
||||
id: this.params.id,
|
||||
...this.sf.value,
|
||||
|
||||
@ -6,45 +6,14 @@
|
||||
</div>
|
||||
<div class="rightBox">
|
||||
<nz-tabset [nzSize]="'small'">
|
||||
<!-- <nz-tab nzTitle="操作权限">
|
||||
<div *ngFor="let item of origin?.buttonInfoList">
|
||||
<label nz-checkbox [(ngModel)]="item.checked" (ngModelChange)="addAuthority(origin, node, item)">{{ item.title
|
||||
}}</label>
|
||||
</div>
|
||||
<nz-empty nzNotFoundImage="simple" *ngIf="origin?.buttonInfoList?.length === 0">
|
||||
</nz-empty>
|
||||
</nz-tab> -->
|
||||
<nz-tab nzTitle="操作权限">
|
||||
<div *ngIf="origin.buttonInfoList && origin.buttonInfoList.length">
|
||||
<label style="width: 100%"
|
||||
nz-checkbox
|
||||
[(ngModel)]="item.checked"
|
||||
*ngFor="let item of origin.buttonInfoList"
|
||||
(ngModelChange)="addAuthority(origin, node, item)"
|
||||
[disabled]="source === 'onlyAuth'"
|
||||
>{{ item.permissionsName }}</label
|
||||
>
|
||||
<label style="width: 100%" nz-checkbox [(ngModel)]="item.checked" *ngFor="let item of origin.buttonInfoList"
|
||||
(ngModelChange)="addAuthority(origin, node, item)" [disabled]="source === 'onlyAuth'">{{
|
||||
item.permissionsName }}</label>
|
||||
</div>
|
||||
<nz-empty nzNotFoundImage="simple" *ngIf="origin.buttonInfoList && origin.buttonInfoList.length === 0"> </nz-empty>
|
||||
</nz-tab>
|
||||
<nz-tab nzTitle="数据权限">
|
||||
<div *ngIf="origin.dictList?.length>0" se-container [labelWidth]="100">
|
||||
<se [col]="1" label="用户范围" style="margin-bottom: 8px;" required>
|
||||
<nz-select>
|
||||
<nz-option nzValue="仅可见自己创建的数据" nzLabel="仅可见自己创建的数据"></nz-option>
|
||||
<nz-option nzValue="可见全部人创建的数据" nzLabel="可见全部人创建的数据"></nz-option>
|
||||
</nz-select>
|
||||
</se>
|
||||
<se [col]="1" label="运营主体" style="margin-bottom: 8px;" required>
|
||||
<nz-select nzMode="multiple" nzShowSearch>
|
||||
<nz-option nzValue="全部" nzLabel="全部"></nz-option>
|
||||
<nz-option nzValue="天津" nzLabel="天津"></nz-option>
|
||||
<nz-option nzValue="山西" nzLabel="山西"></nz-option>
|
||||
<nz-option nzValue="北京" nzLabel="北京"></nz-option>
|
||||
</nz-select>
|
||||
</se>
|
||||
</div>
|
||||
<p *ngIf="origin?.dictList?.length === 0">此应用功能模块无数据权限限制,如需添加,请联系系统管理员。</p>
|
||||
<nz-empty nzNotFoundImage="simple" *ngIf="origin.buttonInfoList && origin.buttonInfoList.length === 0">
|
||||
</nz-empty>
|
||||
</nz-tab>
|
||||
</nz-tabset>
|
||||
</div>
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user