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

This commit is contained in:
潘晓云
2022-03-04 17:43:50 +08:00
38 changed files with 748 additions and 693 deletions

View File

@ -171,7 +171,7 @@
</nz-card>
<nz-card nzTitle="操作日志">
<st #st [data]="service.$api_getOperationLogRecordsList" [columns]="logColumns"
[page]="{ show: false, showSize: false }"
[page]="{}"
[req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' }, params: reqParams }"
[res]="{ reName: { list: 'data.records', total: 'data.total' } }">
</st>

View File

@ -65,7 +65,7 @@ export class SupplyManagementBulkDetailComponent implements OnInit {
get reqParams() {
return {
operateObject: this.i?.resourceCode,
operateType: 4,
operateTypeList: [4,7],
};
}
currentStatus = 0;

View File

@ -464,19 +464,6 @@ export class SupplyManagementBulkPublishComponent 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: ''
// },
receiptUserName: {
type: 'string',
title: '联系人',
@ -738,7 +725,7 @@ export class SupplyManagementBulkPublishComponent implements OnInit {
nzContent: TranAgreementComponent,
nzWidth: 900,
nzFooter: null,
nzComponentParams: { object: params, shipperName: this.shipperName }
nzComponentParams: { object: params, shipperName: this.shipperName , type:'bulk'}
});
modalRef.afterClose.subscribe(result => {
if (result) {
@ -1024,6 +1011,13 @@ export class SupplyManagementBulkPublishComponent implements OnInit {
if (this.PageStatus === '大宗修改') {
this.sf4data.id = res?.goodsInfoVOList[0]?.id;
}
// 计算里程,时间
if (this.startInfo[0]?.detailedAddress && this.endInfo[0]?.detailedAddress) {
this.amapService.drivingCompute([...this.startInfo], [...this.endInfo]).subscribe(res => {
this.totalDistance = res.distance;
this.totalTime = res.time;
});
}
this.totalFees = res?.freightPrice || '0';
this.sf7data = {
stateReceipt: res?.stateReceipt,
@ -1096,13 +1090,13 @@ export class SupplyManagementBulkPublishComponent implements OnInit {
element.type = '2';
});
// 计算里程,时间
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;
});
}
// 计算里程,时间
if (this.startInfo[0]?.detailedAddress && this.endInfo[0]?.detailedAddress) {
this.amapService.drivingCompute([...this.startInfo], [...this.endInfo]).subscribe(res => {
this.totalDistance = res.distance;
this.totalTime = res.time;
});
}
}
getLimitvalue() {
const getlimitvaluesParms = [

View File

@ -48,6 +48,7 @@ export class SupplyManagementBulkReleasePublishComponent implements OnInit {
maxTrainNumber: 99999,
maxFreight: 9999999
}
shipperName = '';
// // 单位
startInfo: any[] = [];
endInfo: any[] = [];
@ -139,10 +140,11 @@ export class SupplyManagementBulkReleasePublishComponent implements OnInit {
return of([]);
}
},
change: (q: any) => {
change: (q: any, qs: any) => {
let str =q.replace(/^\s+|\s+$/g,"");
if (str) {
this.getRegionCode(str);
this.shipperName = qs?.label;
}
}
} as SFSelectWidgetSchema
@ -606,51 +608,54 @@ export class SupplyManagementBulkReleasePublishComponent implements OnInit {
this.service.msgSrv.error(`当前运费单价已超出限定值【${this.limitValues.maxFreight}元】`);
return;
}
// //装卸货信息
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,
...this.sf4.value,
carModel: this.sf4.value.carModel.join(','),
carLength: this.sf4.value.carLength.join(',')
}
];
const params = {
id: '',
...this.sf1.value,
unLoadingPlaceDTOList: LoadingList,
goodsInfoDTOList: goodsInfoList,
...this.sf6.value
};
const modalRef = this.modalService.create({
nzTitle: '运输协议',
nzContent: TranAgreementComponent,
nzWidth: 900,
nzFooter: null
nzFooter: null,
nzComponentParams: { object: params, shipperName: this.shipperName , type:'bulk'}
});
modalRef.afterClose.subscribe(result => {
if (result) {
this.submit(submitType);
this.submit(submitType, params);
}
});
}
// 确认提交(下单)
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,
...this.sf4.value,
carModel: this.sf4.value.carModel.join(','),
carLength: this.sf4.value.carLength.join(',')
}
];
const params = {
id: '',
...this.sf1.value,
unLoadingPlaceDTOList: LoadingList,
goodsInfoDTOList: goodsInfoList,
...this.sf6.value
};
submit(submitType?: string, params?: any): void {
let reqUrl = this.service.$api_consignBulk;
if (submitType === 'assign') {
@ -839,13 +844,13 @@ export class SupplyManagementBulkReleasePublishComponent implements OnInit {
element.type = '2';
});
// 计算里程,时间
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;
});
}
// 计算里程,时间
if (this.startInfo[0]?.detailedAddress && this.endInfo[0]?.detailedAddress) {
this.amapService.drivingCompute([...this.startInfo], [...this.endInfo]).subscribe(res => {
this.totalDistance = res.distance;
this.totalTime = res.time;
});
}
}
getLimitvalue() {
const getlimitvaluesParms = [

View File

@ -4,7 +4,7 @@
* @Author : Shiming
* @Date : 2022-01-12 10:52:50
* @LastEditors : Shiming
* @LastEditTime : 2022-03-02 18:09:01
* @LastEditTime : 2022-03-04 15:45:58
* @FilePath : \\tms-obc-web\\src\\app\\routes\\supply-management\\components\\bulk\\bulk.component.html
* Copyright (C) 2022 huzhenhong. All rights reserved.
-->
@ -32,7 +32,7 @@
</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" [disabled]="loading"></button>
<button nz-button nzType="primary" [disabled]="loading" (click)="exportFire()"></button>
<button nz-button [disabled]="loading" (click)="resetSF()">重置</button>
<button nz-button nzType="link" (click)="expandToggle()">
{{ !_$expand ? '展开' : '收起' }}

View File

@ -569,7 +569,12 @@ export class SupplyManagementBulkComponent implements OnInit {
}
})
}
userAction() {
}
// 导出
exportFire() {
this.service.request(this.service.$api_asyncExportBulkList, this.reqParams ).subscribe((res: any) => {
if(res) {
this.service.msgSrv.success('导出成功,请去下载中心下载!')
}
})
}
}

View File

@ -228,13 +228,15 @@
</ng-template>
</sf>
</nz-card>
<nz-card>
<div class="card-title">服务信息</div>
<div nz-row>
<div nz-col nzSpan="16">
<sf #sf5 [schema]="schema5" [button]="'none'" [ui]="ui5" [formData]="sf5data">
<ng-template sf-template="freeInsurance" let-i let-ui="ui">
<ng-template sf-template="freeInsurance1" let-i let-ui="ui">
<nz-alert nzType="warning" [nzMessage]="template1" nzShowIcon></nz-alert>
</ng-template>
<ng-template sf-template="freeInsurance2" let-i let-ui="ui">
<nz-alert nzType="warning" [nzMessage]="template1" nzShowIcon></nz-alert>
</ng-template>
<ng-template #template1>推荐投保,填写货值自动估保费,司机接单后不可退保。详见<a target="_blank" [queryParams]="{ type: 10 }" [routerLink]="['/agreement']">《投保告知》</a></ng-template>
@ -243,10 +245,10 @@
<nz-input-number
[ngModel]="i.value"
[nzMin]="50000"
[nzMax]="3000000"
[nzMax]="2000000"
[nzStep]="0.01"
(ngModelChange)="i.setValue($event);getInsurersPrice()"
nzPlaceHolder="请输入50000-3000000之间数值"
nzPlaceHolder="请输入50000-2000000之间数值"
></nz-input-number>
</div>
</ng-template>
@ -258,9 +260,10 @@
></span>
<ng-template #template2>
<p>注意事项:</p>
<p>①请仔细阅读《投保告知</p>
<p>港澳台、西藏不在投保范围内,不予承保</p>
<p>保价费最低收费2元请按真实货值填写录入的所有信息必须确保真实不如实录入的内容不承担对应赔偿责任。</p>
<p>①请仔细阅读《投保告知函》;</p>
<p>香港、澳门、台湾、西藏、新疆不在投保范围内,不予承保</p>
<p>最低保费12元/每单单次运输保额仅限200万元以内</p>
<p>④本保险只限于货物起运前投保,起运后投保无效,保险人不负赔偿责任;</p>
</ng-template>
</div>
</ng-template>

View File

@ -411,7 +411,7 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
properties: {
insuranceType: {
type: 'string',
title: '增值服务套餐',
title: '服务包',
ui: {
widget: 'select',
asyncData: () => {
@ -419,10 +419,15 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
map((res: any) => {
return [...res];
})
);
)
},
change: (tag: any, org: any) => {
this.getInsurersPrice(tag);
if(tag === '3'){
this.sf5.setValue('/insurancePremium', null);
this.sf5.setValue('/insuranceRate', null);
}else {
this.getInsurersPrice(tag);
}
}
},
default: '3'
@ -430,31 +435,39 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
type1: {
type: 'string',
title: '',
enum: ['车辆实时定位', '轨迹查询', '数据保护', '赠送基本险'],
enum: ['资源曝光率 +10', '车源匹配率 +10'],
readOnly: true,
ui: {
widget: 'checkbox',
visibleIf: { insuranceType: (value: string) => value === '0' }
} as SFCheckboxWidgetSchema,
default: ['资源曝光率 +10', '车源匹配率 +10']
},
type2: {
type: 'string',
title: '',
enum: ['资源曝光率 +20', '车源匹配率 +20'],
readOnly: true,
ui: {
widget: 'checkbox',
visibleIf: { insuranceType: (value: string) => value === '1' }
} as SFCheckboxWidgetSchema,
default: ['车辆实时定位', '轨迹查询', '数据保护', '赠送基本险']
default: ['资源曝光率 +20', '车源匹配率 +20']
},
type2: {
freeInsurance1: {
type: 'string',
title: '',
enum: ['车辆实时定位', '轨迹查询', '数据保护', '专属技术服务', '赠送综合险'],
readOnly: true,
ui: {
widget: 'checkbox',
visibleIf: { insuranceType: (value: string) => value === '2' }
} as SFCheckboxWidgetSchema,
default: ['车辆实时定位', '轨迹查询', '数据保护', '专属技术服务', '赠送综合险']
},
freeInsurance: {
type: 'string',
title: '赠送保险',
title: '赠送基本险',
ui: {
widget: 'custom',
visibleIf: { insuranceType: (value: string) => value !== '3' }
visibleIf: { insuranceType: (value: string) => value === '0' }
}
},
freeInsurance2: {
type: 'string',
title: '赠送综合险',
ui: {
widget: 'custom',
visibleIf: { insuranceType: (value: string) => value === '1' }
}
},
insurancePackagedGoods: {
@ -480,7 +493,6 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
title: '货物价值',
ui: {
widget: 'custom',
descriptionI18n: '输入50000-3000000之间数值',
visibleIf: { insuranceType: (value: string) => value !== '3' }
}
},
@ -514,7 +526,10 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
$type2: {
grid: { span: 24 }
},
$freeInsurance: {
$freeInsurance1: {
grid: { span: 24 }
},
$freeInsurance2: {
grid: { span: 24 }
}
};
@ -566,65 +581,45 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
}
}
},
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
}
},
phon: {
receiptUserPhone: {
type: 'string',
title: '联系电话',
maxLength: 11,
ui: {
visibleIf: {
receiptType: value => value === '2'
}
},
readOnly: true
}
},
area: {
receiptAddressArea: {
type: 'string',
title: '所在地区',
maxLength: 30,
ui: {
visibleIf: {
receiptType: value => value === '2'
}
},
readOnly: true
}
},
address: {
receiptAddress: {
type: 'string',
title: '详细地址',
maxLength: 30,
ui: {
visibleIf: {
receiptType: value => value === '2'
}
},
readOnly: true
}
},
remarks: {
type: 'string',
@ -637,11 +632,11 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
} as SFTextareaWidgetSchema
}
},
required: ['stateReceipt', 'receiptType', 'receiptAddress']
required: ['stateReceipt', 'receiptType', 'receiptUserName', 'receiptUserPhone', 'receiptAddressArea', 'receiptAddress']
};
this.ui6 = {
'*': {
spanLabelFixed: 115,
spanLabelFixed: 90,
grid: { span: 24 }
}
};
@ -1004,7 +999,7 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
nzContent: TranAgreementComponent,
nzWidth: 900,
nzFooter: null,
nzComponentParams: { object: params, shipperName: this.shipperName }
nzComponentParams: { object: params, shipperName: this.shipperName,type:'onecar' }
});
modalRef.afterClose.subscribe(result => {
if (result) {
@ -1050,6 +1045,8 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
}
// 打开地图
openMap(type: string, index: number) {
console.log(type);
console.log(index);
const modalRef = this.modalService.create({
nzTitle: '',
nzContent: AmapPoiPickerComponent,
@ -1197,13 +1194,14 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
this.validateForm1.addControl(`unloadPhone${controlId}`, new FormControl(null, Validators.required));
}
// 计算里程,时间
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;
});
}
// 计算里程,时间
if (this.startInfo[0]?.detailedAddress && this.endInfo[0]?.detailedAddress) {
this.amapService.drivingCompute([...this.startInfo], [...this.endInfo]).subscribe(res => {
this.totalDistance = res.distance;
this.totalTime = res.time;
this.getInsurersPrice(); //计算保费金额
});
}
});
this.sf3data = {
@ -1312,14 +1310,14 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
default:
break;
}
// 计算里程,时间
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(); //计算保费金额
});
}
// 计算里程,时间
if (this.startInfo[0]?.detailedAddress && this.endInfo[0]?.detailedAddress) {
this.amapService.drivingCompute([...this.startInfo], [...this.endInfo]).subscribe(res => {
this.totalDistance = res.distance;
this.totalTime = res.time;
this.getInsurersPrice(); //计算保费金额
});
}
}
});
}
@ -1363,7 +1361,7 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
this.validateForm1.addControl(`unloadPhone${index}`, new FormControl(null, [Validators.required, Validators.pattern('^[0-9]*$')]));
});
// 计算里程,时间
if (this.startInfo[0]?.area && this.endInfo[0]?.area) {
if (this.startInfo[0]?.detailedAddress && this.endInfo[0]?.detailedAddress) {
this.amapService.drivingCompute([...this.startInfo], [...this.endInfo]).subscribe(res => {
this.totalDistance = res.distance;
this.totalTime = res.time;

View File

@ -238,7 +238,10 @@
<div nz-row>
<div nz-col nzSpan="16">
<sf #sf5 [schema]="schema5" [button]="'none'" [ui]="ui5" [formData]="sf5data">
<ng-template sf-template="freeInsurance" let-i let-ui="ui">
<ng-template sf-template="freeInsurance1" let-i let-ui="ui">
<nz-alert nzType="warning" [nzMessage]="template1" nzShowIcon></nz-alert>
</ng-template>
<ng-template sf-template="freeInsurance2" let-i let-ui="ui">
<nz-alert nzType="warning" [nzMessage]="template1" nzShowIcon></nz-alert>
</ng-template>
<ng-template #template1>推荐投保,填写货值自动估保费,司机接单后不可退保。详见<a target="_blank" [queryParams]="{ type: 10 }" [routerLink]="['/agreement']">《投保告知》</a></ng-template>
@ -247,10 +250,10 @@
<nz-input-number
[ngModel]="i.value"
[nzMin]="50000"
[nzMax]="3000000"
[nzMax]="2000000"
[nzStep]="0.01"
(ngModelChange)="i.setValue($event);getInsurersPrice()"
nzPlaceHolder="请输入50000-3000000之间数值"
nzPlaceHolder="请输入50000-2000000之间数值"
></nz-input-number>
</div>
</ng-template>
@ -262,9 +265,10 @@
></span>
<ng-template #template2>
<p>注意事项:</p>
<p>①请仔细阅读《投保告知</p>
<p>港澳台、西藏不在投保范围内,不予承保</p>
<p>保价费最低收费2元请按真实货值填写录入的所有信息必须确保真实不如实录入的内容不承担对应赔偿责任。</p>
<p>①请仔细阅读《投保告知函》;</p>
<p>香港、澳门、台湾、西藏、新疆不在投保范围内,不予承保</p>
<p>最低保费12元/每单单次运输保额仅限200万元以内</p>
<p>④本保险只限于货物起运前投保,起运后投保无效,保险人不负赔偿责任;</p>
</ng-template>
</div>
</ng-template>
@ -277,15 +281,6 @@
<div nz-row>
<div nz-col nzSpan="12">
<sf #sf6 [schema]="schema6" [button]="'none'" [ui]="ui6" [formData]="sf6data">
<!-- <ng-template sf-template="receiptAddressId" let-i let-ui="ui">
<input
nz-input
[ngModel]="i.value"
(ngModelChange)="i.setValue($event)"
placeholder="请点击选择收回单地址"
(click)="backBillChange()"
/>
</ng-template> -->
</sf>
</div>
</div>

View File

@ -411,7 +411,7 @@ export class SupplyManagementReleasePublishComponent implements OnInit {
properties: {
insuranceType: {
type: 'string',
title: '增值服务套餐',
title: '服务包',
ui: {
widget: 'select',
asyncData: () => {
@ -419,10 +419,15 @@ export class SupplyManagementReleasePublishComponent implements OnInit {
map((res: any) => {
return [...res];
})
);
)
},
change: (tag: any, org: any) => {
this.getInsurersPrice(tag);
if(tag === '3'){
this.sf5.setValue('/insurancePremium', null);
this.sf5.setValue('/insuranceRate', null);
}else {
this.getInsurersPrice(tag);
}
}
},
default: '3'
@ -430,31 +435,39 @@ export class SupplyManagementReleasePublishComponent implements OnInit {
type1: {
type: 'string',
title: '',
enum: ['车辆实时定位', '轨迹查询', '数据保护', '赠送基本险'],
enum: ['资源曝光率 +10', '车源匹配率 +10'],
readOnly: true,
ui: {
widget: 'checkbox',
visibleIf: { insuranceType: (value: string) => value === '0' }
} as SFCheckboxWidgetSchema,
default: ['资源曝光率 +10', '车源匹配率 +10']
},
type2: {
type: 'string',
title: '',
enum: ['资源曝光率 +20', '车源匹配率 +20'],
readOnly: true,
ui: {
widget: 'checkbox',
visibleIf: { insuranceType: (value: string) => value === '1' }
} as SFCheckboxWidgetSchema,
default: ['车辆实时定位', '轨迹查询', '数据保护', '赠送基本险']
default: ['资源曝光率 +20', '车源匹配率 +20']
},
type2: {
freeInsurance1: {
type: 'string',
title: '',
enum: ['车辆实时定位', '轨迹查询', '数据保护', '专属技术服务', '赠送综合险'],
readOnly: true,
ui: {
widget: 'checkbox',
visibleIf: { insuranceType: (value: string) => value === '2' }
} as SFCheckboxWidgetSchema,
default: ['车辆实时定位', '轨迹查询', '数据保护', '专属技术服务', '赠送综合险']
},
freeInsurance: {
type: 'string',
title: '赠送保险',
title: '赠送基本险',
ui: {
widget: 'custom',
visibleIf: { insuranceType: (value: string) => value !== '3' }
visibleIf: { insuranceType: (value: string) => value === '0' }
}
},
freeInsurance2: {
type: 'string',
title: '赠送综合险',
ui: {
widget: 'custom',
visibleIf: { insuranceType: (value: string) => value === '1' }
}
},
insurancePackagedGoods: {
@ -480,7 +493,6 @@ export class SupplyManagementReleasePublishComponent implements OnInit {
title: '货物价值',
ui: {
widget: 'custom',
descriptionI18n: '输入50000-3000000之间数值',
visibleIf: { insuranceType: (value: string) => value !== '3' }
}
},
@ -514,7 +526,10 @@ export class SupplyManagementReleasePublishComponent implements OnInit {
$type2: {
grid: { span: 24 }
},
$freeInsurance: {
$freeInsurance1: {
grid: { span: 24 }
},
$freeInsurance2: {
grid: { span: 24 }
}
};
@ -550,65 +565,45 @@ export class SupplyManagementReleasePublishComponent implements OnInit {
}
}
},
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
}
},
phon: {
receiptUserPhone: {
type: 'string',
title: '联系电话',
maxLength: 11,
ui: {
visibleIf: {
receiptType: value => value === '2'
}
},
readOnly: true
}
},
area: {
receiptAddressArea: {
type: 'string',
title: '所在地区',
maxLength: 30,
ui: {
visibleIf: {
receiptType: value => value === '2'
}
},
readOnly: true
}
},
address: {
receiptAddress: {
type: 'string',
title: '详细地址',
maxLength: 30,
ui: {
visibleIf: {
receiptType: value => value === '2'
}
},
readOnly: true
}
},
remarks: {
type: 'string',
@ -621,11 +616,11 @@ export class SupplyManagementReleasePublishComponent implements OnInit {
} as SFTextareaWidgetSchema
}
},
required: ['stateReceipt', 'receiptType', 'receiptAddress']
required: ['stateReceipt', 'receiptType', 'receiptUserName', 'receiptUserPhone', 'receiptAddressArea', 'receiptAddress']
};
this.ui6 = {
'*': {
spanLabelFixed: 115,
spanLabelFixed: 90,
grid: { span: 24 }
}
};
@ -979,7 +974,7 @@ export class SupplyManagementReleasePublishComponent implements OnInit {
nzContent: TranAgreementComponent,
nzWidth: 900,
nzFooter: null,
nzComponentParams: { object: params ,shipperName: this.shipperName}
nzComponentParams: { object: params ,shipperName: this.shipperName,type:'onecar'}
});
modalRef.afterClose.subscribe(result => {
if (result) {
@ -1176,14 +1171,14 @@ export class SupplyManagementReleasePublishComponent implements OnInit {
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(); //计算保费金额
});
}
// 计算里程,时间
if (this.startInfo[0]?.detailedAddress && this.endInfo[0]?.detailedAddress) {
this.amapService.drivingCompute([...this.startInfo], [...this.endInfo]).subscribe(res => {
this.totalDistance = res.distance;
this.totalTime = res.time;
this.getInsurersPrice(); //计算保费金额
});
}
}
// 计算保价费金额
getInsurersPrice(insuranceType = this.sf5.value.insuranceType) {

View File

@ -4,7 +4,7 @@
* @Author : Shiming
* @Date : 2022-02-24 20:19:51
* @LastEditors : Shiming
* @LastEditTime : 2022-03-03 14:24:51
* @LastEditTime : 2022-03-04 16:46:31
* @FilePath : \\tms-obc-web\\src\\app\\routes\\supply-management\\components\\tran-agreement\\tran-agreement.component.ts
* Copyright (C) 2022 huzhenhong. All rights reserved.
*/
@ -28,6 +28,8 @@ import { SupplyManagementService } from '../../services/supply-management.servic
styleUrls: ['./tran-agreement.component.less']
})
export class TranAgreementComponent {
enterpriseInfo:any; // 网络货运人
type:any;
object: any;
agreement:any;
envCache:any;
@ -38,13 +40,30 @@ export class TranAgreementComponent {
ngOnInit() {
console.log(this.object)
const params = {
// 获取托运人承运人信息
this.service.request(this.service.$api_getContractAtr,{id:this.object?.shipperAppUserId}).subscribe(res => {
if (res) {
this.enterpriseInfo = res
this.getContent();
}
});
}
getContent() {
let params:any;
if(this.type ==='onecar'){
params = {
contractType:'1',
resourceType: '1',
signingObject: '1',
templateType: 'MX',
parametersDTO: {
contractCode:'',
shipperLegalPersonName:this.enterpriseInfo.legalPersonName, //托运法定代表人
carrierLegalPersonName:this.enterpriseInfo.netLegalPersonName, //承运法定代表人
shipperName:this?.shipperName, //托运人
carrierName:this.object?.enterpriseInfoName, //承运人
consignorInfo: `${this.object?.unLoadingPlaceDTOList[0].appUserName} ${this.object?.unLoadingPlaceDTOList[0].contractTelephone}`, // 发货信息
@ -69,15 +88,48 @@ export class TranAgreementComponent {
day:new Date().getDate(), // 签约日期
}
}
} else if(this.type ==='bulk'){
params = {
contractType:'1',
resourceType: '2',
signingObject: '1',
templateType: 'MX',
parametersDTO: {
contractCode:'',
shipperName:this?.shipperName, //托运人
carrierName:this.object?.enterpriseInfoName, //承运人
shipperLegalPersonName:this.enterpriseInfo.legalPersonName, //托运法定代表人
carrierLegalPersonName:this.enterpriseInfo.netLegalPersonName, //承运法定代表人
consignorInfo: `${this.object.unLoadingPlaceDTOList[0].appUserName} ${this.object.unLoadingPlaceDTOList[0].contractTelephone}`, // 发货信息
consignorAddress: this.object.unLoadingPlaceDTOList[0].detailedAddress, // 发货地址
consignorDate: '', // 发货时间
consigneeInfo: `${this.object.unLoadingPlaceDTOList[this.object.unLoadingPlaceDTOList.length-1].appUserName} ${this.object.unLoadingPlaceDTOList[this.object.unLoadingPlaceDTOList.length-1].contractTelephone}`, // 收货信息
consigneeDate: '', // 收货时间
consigneeAddress: this.object.unLoadingPlaceDTOList[this.object.unLoadingPlaceDTOList.length-1].detailedAddress, // 收货地址
goodsName:this.object.goodsInfoDTOList[0].goodsName, // 货物名称
shippingType:'大宗运输',
consignmentVolume:`${this.object.goodsInfoDTOList[0].weight}吨/${this.object.goodsInfoDTOList[0].volume}方/${this.object.goodsInfoDTOList[0].number}`, //托运量
transporterInfo:'', //运输方信息
freightAmount:'', // 订单运费金额(元)
pre:'', //预付
rece:'',// 到付
back:'',// 回单付
lunarKnot:'',
total:'', // 合计(元)
paymentTime:`到货后${this.object.paymentDays}`, // 承诺支付运费时间
year:new Date().getFullYear(), // 签约年份
month:new Date().getMonth()+1, // 签约月份
day:new Date().getDate(), // 签约日期
},
}
}
console.log(params)
this.service.request(this.service.$api_getContractContent,params).subscribe((res) => {
if (res) {
this.agreement = res.contractContent;
}
});
}
handleOk(){
this.modal.close(true);
}

View File

@ -4,7 +4,7 @@
* @Author : Shiming
* @Date : 2021-12-03 11:10:14
* @LastEditors : Shiming
* @LastEditTime : 2022-02-16 15:02:33
* @LastEditTime : 2022-03-04 14:37:19
* @FilePath : \\tms-obc-web\\src\\app\\routes\\supply-management\\components\\update-price\\update-price.component.html
* Copyright (C) 2022 huzhenhong. All rights reserved.
-->
@ -25,12 +25,15 @@
</div>
<div>
<h4>变更日志</h4>
<st #st [data]="service.$api_getOperationLogRecordsList" [bordered]="true" [columns]="columns" [page]="{ show: false }" [req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' }, params: reqParams }">
<ng-template st-row="operator" let-item let-index="index">
<span>{{item.operator}}</span>/
<span>{{item.telephone}}</span>
</ng-template>
</st>
<st #st [data]="service.$api_getOperationLogRecordsList" [columns]="columns"
[req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' }, params: reqParams}"
[res]="{ reName: { list: 'data.records', total: 'data.total' } }"
[page]="{}"
>
<ng-template st-row="operator" let-item>
{{item?.operator}}/{{item.telephone}}
</ng-template>
</st>
</div>
<ng-template #addOnAfterTemplate>
<span> {{ freightType[i?.freightType] }}</span>

View File

@ -159,10 +159,10 @@
<sv label="增值服务套餐">
{{ i?.insuranceTypeLabel }}
</sv>
<sv label="货物价值">
<sv label="货物价值" *ngIf="i?.insuranceType !== '3'">
{{ i?.goodsValue | currency }}
</sv>
<sv label="保价费金额"> {{ i?.insurancePremium | currency }} 元 </sv>
<sv label="保价费金额" *ngIf="i?.insuranceType !== '3'"> {{ i?.insurancePremium | currency }} 元 </sv>
</sv-container>
</nz-card>
<nz-card [nzTitle]="'运费信息到货后' + i?.paymentDays + '天内支付运费'">
@ -213,7 +213,7 @@
</nz-card>
<nz-card nzTitle="操作日志">
<st #st [data]="service.$api_getOperationLogRecordsList" [columns]="logColumns"
[page]="{ show: false, showSize: false }"
[page]="{}"
[req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' }, params: reqParams }"
[res]="{ reName: { list: 'data.records', total: 'data.total' } }">
</st>

View File

@ -53,7 +53,7 @@ export class SupplyManagementVehicleDetailComponent implements OnInit {
get reqParams() {
return {
operateObject: this.i?.resourceCode,
operateType: 4,
operateTypeList: [4,7],
};
}
constructor(

View File

@ -4,7 +4,7 @@
* @Author : Shiming
* @Date : 2022-01-12 10:52:50
* @LastEditors : Shiming
* @LastEditTime : 2022-03-03 16:34:12
* @LastEditTime : 2022-03-04 09:57:16
* @FilePath : \\tms-obc-web\\src\\app\\routes\\supply-management\\components\\vehicle\\vehicle.component.html
* Copyright (C) 2022 huzhenhong. All rights reserved.
-->
@ -31,7 +31,7 @@
[acl-ability]="['SUPPLY-INDEX-vehicleSearch']"
>查询</button
>
<button nz-button nzType="primary" [disabled]="loading">导出</button>
<button nz-button nzType="primary" [disabled]="loading" (click)="exportFire()" >导出</button>
<button nz-button [disabled]="loading" (click)="resetSF()">重置</button>
<button nz-button nzType="link" (click)="expandToggle()">
{{ !_$expand ? '展开' : '收起' }}
@ -80,10 +80,10 @@
<p>{{ item?.resourceStatusLabel }}</p>
</ng-template>
<ng-template st-row="total" let-item let-index="index">
<div class="mr-xs">{{ item?.totalAmount + item?.surcharge | currency }} </div>
<div class="mr-xs">{{ item?.totalAmount | currency }} </div>
</ng-template>
<ng-template st-row="totalAmount" let-item let-index="index">
<div class="mr-xs">{{ item?.totalAmount | currency }} </div>
<div class="mr-xs">{{ item?.freight | currency }} </div>
</ng-template>
<ng-template st-row="surcharge" let-item let-index="index">
<div class="mr-xs">{{ item?.surcharge | currency }} </div>

View File

@ -611,4 +611,12 @@ export class SupplyManagementVehicleComponent implements OnInit {
}
];
}
// 导出
exportFire() {
this.service.request(this.service.$api_asyncExportWholeList, this.reqParams ).subscribe((res: any) => {
if(res) {
this.service.msgSrv.success('导出成功,请去下载中心下载!')
}
})
}
}