This commit is contained in:
1107302052
2022-03-18 00:43:17 +08:00
parent d9d9ea2733
commit 759c829c4d
3 changed files with 34 additions and 32 deletions

View File

@ -193,10 +193,10 @@ export class SupplyManagementBulkPublishComponent implements OnInit {
type: 'string', type: 'string',
title: '调度员手机号', title: '调度员手机号',
maxLength: 30, maxLength: 30,
ui: { ui: {
placeholder: '请输入' placeholder: '请输入'
} }
}, }
}, },
required: ['shipperAppUserId', 'enterpriseProjectId', 'enterpriseInfoName', 'deadlineTime'] required: ['shipperAppUserId', 'enterpriseProjectId', 'enterpriseInfoName', 'deadlineTime']
}; };
@ -204,7 +204,7 @@ export class SupplyManagementBulkPublishComponent implements OnInit {
'*': { '*': {
spanLabelFixed: 115, spanLabelFixed: 115,
grid: { span: 12 } grid: { span: 12 }
}, }
}; };
} }
initSF3() { initSF3() {
@ -275,7 +275,7 @@ export class SupplyManagementBulkPublishComponent implements OnInit {
} }
} }
}, },
required: ['goodsTypeId', 'goodsName', 'goodsNameId','goodsName1'] required: ['goodsTypeId', 'goodsName', 'goodsNameId', 'goodsName1']
}; };
this.ui3 = { this.ui3 = {
'*': { '*': {
@ -534,7 +534,7 @@ export class SupplyManagementBulkPublishComponent implements OnInit {
Number(this.sf7?.value?.receiptPay) + Number(this.sf7?.value?.receiptPay) +
Number(this.sf7?.value?.toPay); Number(this.sf7?.value?.toPay);
} }
initDict() { initDict() {
this.service.getDictByKey('freight:type').subscribe(res => { this.service.getDictByKey('freight:type').subscribe(res => {
this.freightTypeOptions = res; this.freightTypeOptions = res;
}); });
@ -716,7 +716,7 @@ export class SupplyManagementBulkPublishComponent implements OnInit {
unLoadingPlaceDTOList: LoadingList, unLoadingPlaceDTOList: LoadingList,
goodsInfoDTOList: goodsInfoDTOList, goodsInfoDTOList: goodsInfoDTOList,
estimatedKilometers: this.totalDistance, estimatedKilometers: this.totalDistance,
estimatedTravelTime: this.totalTime, estimatedTravelTime: this.totalTime
}; };
params.freightPrice = this.totalFees; params.freightPrice = this.totalFees;
const modalRef = this.modalService.create({ const modalRef = this.modalService.create({
@ -724,7 +724,7 @@ export class SupplyManagementBulkPublishComponent implements OnInit {
nzContent: TranAgreementComponent, nzContent: TranAgreementComponent,
nzWidth: 900, nzWidth: 900,
nzFooter: null, nzFooter: null,
nzComponentParams: { object: params, shipperName: this.shipperName , type:'bulk'} nzComponentParams: { object: params, shipperName: this.shipperName, type: 'bulk' }
}); });
modalRef.afterClose.subscribe(result => { modalRef.afterClose.subscribe(result => {
if (result) { if (result) {
@ -1011,13 +1011,13 @@ export class SupplyManagementBulkPublishComponent implements OnInit {
if (this.PageStatus === '大宗修改') { if (this.PageStatus === '大宗修改') {
this.sf4data.id = res?.goodsInfoVOList[0]?.id; this.sf4data.id = res?.goodsInfoVOList[0]?.id;
} }
// 计算里程,时间 // 计算里程,时间
if (this.startInfo[0]?.detailedAddress && this.endInfo[0]?.detailedAddress) { if (this.startInfo[0]?.detailedAddress && this.endInfo[0]?.detailedAddress) {
this.amapService.drivingCompute([...this.startInfo], [...this.endInfo]).subscribe(res => { this.amapService.drivingCompute([...this.startInfo], [...this.endInfo]).subscribe(res => {
this.totalDistance = res.distance; this.totalDistance = res.distance;
this.totalTime = res.time; this.totalTime = res.time;
}); });
} }
this.totalFees = res?.freightPrice || '0'; this.totalFees = res?.freightPrice || '0';
this.sf7data = { this.sf7data = {
stateReceipt: res?.stateReceipt, stateReceipt: res?.stateReceipt,
@ -1090,13 +1090,13 @@ export class SupplyManagementBulkPublishComponent implements OnInit {
element.type = '2'; element.type = '2';
}); });
// 计算里程,时间 // 计算里程,时间
if (this.startInfo[0]?.detailedAddress && this.endInfo[0]?.detailedAddress) { if (this.startInfo[0]?.detailedAddress && this.endInfo[0]?.detailedAddress) {
this.amapService.drivingCompute([...this.startInfo], [...this.endInfo]).subscribe(res => { this.amapService.drivingCompute([...this.startInfo], [...this.endInfo]).subscribe(res => {
this.totalDistance = res.distance; this.totalDistance = res.distance;
this.totalTime = res.time; this.totalTime = res.time;
}); });
} }
} }
getLimitvalue() { getLimitvalue() {
const getlimitvaluesParms = [ const getlimitvaluesParms = [

View File

@ -134,20 +134,12 @@
<sf #sf4 [schema]="schema4" [button]="'none'" [ui]="ui4" [formData]="sf4data"> <sf #sf4 [schema]="schema4" [button]="'none'" [ui]="ui4" [formData]="sf4data">
<ng-template sf-template="freightPrice" let-i let-ui="ui"> <ng-template sf-template="freightPrice" let-i let-ui="ui">
<nz-input-group [nzAddOnAfter]="addOnAfterTemplate"> <nz-input-group [nzAddOnAfter]="addOnAfterTemplate">
<input <nz-input-number [nzMax]="99999" [nzMin] ="0" nzPlaceHolder="请输入" type="number" [ngModel]="i.value"
nz-input (ngModelChange)="i.setValue($event)" [nzPrecision]="2" style="width: 100%;"></nz-input-number>
type="number"
min="0"
step="0.01"
[ngModel]="i.value"
(ngModelChange)="i.setValue($event)"
placeholder="请输入"
oninput="if(value>99999)value=99999;if(value<1)value=1"
/>
</nz-input-group> </nz-input-group>
<ng-template #addOnAfterTemplate> <ng-template #addOnAfterTemplate>
<nz-select [ngModel]="sf4.value.freightType" (ngModelChange)="sf4.setValue('/freightType', $event)"> <nz-select [ngModel]="sf4.value.freightType" (ngModelChange)="sf4.setValue('/freightType', $event)">
<nz-option [nzValue]="item.value" [nzLabel]="item.label" *ngFor="let item of freightTypeOptions"></nz-option> <nz-option [nzValue]="item.value" [nzLabel]="item.label" *ngFor="let item of freightTypeOptions"> </nz-option>
</nz-select> </nz-select>
</ng-template> </ng-template>
</ng-template> </ng-template>

View File

@ -39,6 +39,7 @@ export class SupplyManagementBulkReleasePublishComponent implements OnInit {
creatTime: any; // 货源单设置回显 creatTime: any; // 货源单设置回显
modifyTime: any; // 货源单设置回显 modifyTime: any; // 货源单设置回显
totalFees: any; // 总数信息 totalFees: any; // 总数信息
ruleOptions: any;
id = ''; id = '';
type = 'add'; type = 'add';
limitValues = { limitValues = {
@ -89,6 +90,7 @@ export class SupplyManagementBulkReleasePublishComponent implements OnInit {
this.initSF4(); this.initSF4();
this.initSF6(); this.initSF6();
this.getLimitvalue(); this.getLimitvalue();
this.initDict();
this.startInfo = [ this.startInfo = [
{ {
detailedAddress: '', detailedAddress: '',
@ -538,6 +540,14 @@ export class SupplyManagementBulkReleasePublishComponent implements OnInit {
} }
}; };
} }
initDict() {
this.service.getDictByKey('freight:type').subscribe(res => {
this.freightTypeOptions = res;
});
this.service.getDictByKey('goodresource:rounding:rules').subscribe(res => {
this.ruleOptions = res;
});
}
//指派熟车 //指派熟车
chooseFamifiar(item: any) { chooseFamifiar(item: any) {
const modalRef = this.modalService.create({ const modalRef = this.modalService.create({