车辆对接
This commit is contained in:
@ -1,7 +1,7 @@
|
||||
<!--
|
||||
* @Author: your name
|
||||
* @Date: 2021-12-14 14:03:07
|
||||
* @LastEditTime: 2021-12-20 20:26:52
|
||||
* @LastEditTime: 2021-12-21 14:47:26
|
||||
* @LastEditors: Please set LastEditors
|
||||
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
||||
* @FilePath: \tms-obc-web\src\app\routes\order-management\modal\bulk\update-freight\update-freight.component.html
|
||||
@ -50,10 +50,10 @@ nzMessage="签收后不可再修改运费,请确保运费等信息准确无误
|
||||
<div>{{detailList?.goodsInfoVO?.freightPrice ? detailList?.goodsInfoVO?.freightPrice + '元' : ''}} </div>
|
||||
</sv>
|
||||
<sv label="司机车辆">
|
||||
<div>张三 / 18888888888 / 粤GJ401</div>
|
||||
<div>{{driverList?.nickName}} / {{driverList?.telephone}}/ {{carList?.carNo}}</div>
|
||||
</sv>
|
||||
<sv label="收款人">
|
||||
<div>李四 / 1888888888</div>
|
||||
<div>{{payeeList?.nickName}} / {{payeeList?.telephone}}</div>
|
||||
</sv>
|
||||
<sv label="回单凭证">
|
||||
<!-- <app-imagelist
|
||||
|
||||
@ -2,7 +2,7 @@ import { preloaderFinished } from '@delon/theme';
|
||||
/*
|
||||
* @Author: your name
|
||||
* @Date: 2021-12-14 14:03:07
|
||||
* @LastEditTime: 2021-12-21 09:42:54
|
||||
* @LastEditTime: 2021-12-21 13:43:08
|
||||
* @LastEditors: Please set LastEditors
|
||||
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
||||
* @FilePath: \tms-obc-web\src\app\routes\order-management\modal\bulk\update-freight\update-freight.component.ts
|
||||
@ -33,6 +33,9 @@ export class ConfirReceiptComponent implements OnInit {
|
||||
Status:any;
|
||||
detailList:any;
|
||||
data: any = {};
|
||||
driverList: any;
|
||||
payeeList: any;
|
||||
carList: any;
|
||||
constructor(private modal: NzModalRef, private msgSrv: NzMessageService, public http: _HttpClient, public service: OrderManagementService) {}
|
||||
|
||||
ngOnInit(): void {
|
||||
@ -42,7 +45,7 @@ export class ConfirReceiptComponent implements OnInit {
|
||||
save(): void {
|
||||
// 大宗
|
||||
this.service.request(this.service.$api_get_signBulkOrder, {id: this.i?.id}).subscribe((res: any) => {
|
||||
console.log(res)
|
||||
console.log(res.success)
|
||||
if(res) {
|
||||
this.service.msgSrv.success('确认签收成功!')
|
||||
} else {
|
||||
@ -55,11 +58,17 @@ export class ConfirReceiptComponent implements OnInit {
|
||||
this.service.request(this.service.$api_get_getBulkSignForDetail, {id: this.i?.id}).subscribe((res: any) => {
|
||||
console.log(res)
|
||||
this.detailList = res;
|
||||
this.service.request(this.service.$api_getUserDetailByAppUserId, {id: this.detailList?.id}).subscribe((res: any) => {
|
||||
this.service.request(this.service.$api_getUserDetailByAppUserId, {id: this.detailList?.payeeId}).subscribe((res: any) => {
|
||||
console.log(res)
|
||||
this.payeeList = res;
|
||||
})
|
||||
this.service.request(this.service.$api_getUserDetailByAppUserId, {id: this.detailList?.driverId}).subscribe((res: any) => {
|
||||
console.log(res)
|
||||
this.driverList = res;
|
||||
})
|
||||
this.service.request(this.service.$api_getCarLicenseByIds, {id: this.detailList?.carId}).subscribe((res: any) => {
|
||||
console.log(res)
|
||||
this.carList = res;
|
||||
})
|
||||
})
|
||||
|
||||
|
||||
@ -1,53 +1,17 @@
|
||||
<!--
|
||||
* @Author: your name
|
||||
* @Date: 2021-12-14 14:03:07
|
||||
* @LastEditTime: 2021-12-14 15:16:40
|
||||
* @LastEditors: Please set LastEditors
|
||||
* @LastEditTime: 2021-12-21 15:03:17
|
||||
* @LastEditors: your name
|
||||
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
||||
* @FilePath: \tms-obc-web\src\app\routes\order-management\modal\bulk\update-freight\update-freight.component.html
|
||||
-->
|
||||
<nz-spin *ngIf="!i" class="modal-spin"></nz-spin>
|
||||
<sf #sf [schema]="schema" [ui]="ui" [compact]="true" [button]="'none'">
|
||||
<ng-template sf-template="no" let-me let-ui="ui" let-schema="schema">
|
||||
<div style="display: flex;">
|
||||
<nz-input-number [(ngModel)]="data.place" [nzMin]="1" [nzMax]="10" [nzStep]="1"></nz-input-number>
|
||||
<div class="left_btn">元/吨</div>
|
||||
</div>
|
||||
</ng-template>
|
||||
<ng-template sf-template="no2" let-me let-ui="ui" let-schema="schema">
|
||||
<div style="display: flex;">
|
||||
<nz-input-number [(ngModel)]="data.place1" [nzMin]="1" [nzMax]="10" [nzStep]="1"></nz-input-number>
|
||||
<div class="left_btn">吨</div>
|
||||
</div>
|
||||
</ng-template>
|
||||
<ng-template sf-template="no3" let-me let-ui="ui" let-schema="schema">
|
||||
<div style="display: flex;">
|
||||
<nz-input-number [(ngModel)]="data.place2" [nzMin]="1" [nzMax]="10" [nzStep]="1"></nz-input-number>
|
||||
<div class="left_btn">吨</div>
|
||||
</div>
|
||||
</ng-template>
|
||||
<ng-template sf-template="no4" let-me let-ui="ui" let-schema="schema">
|
||||
<div style="display: flex;">
|
||||
<nz-input-number [(ngModel)]="data.place3" [nzMin]="1" [nzMax]="10" [nzStep]="1"></nz-input-number>
|
||||
<div class="left_btn">吨</div>
|
||||
</div>
|
||||
</ng-template>
|
||||
<ng-template sf-template="no5" let-me let-ui="ui" let-schema="schema">
|
||||
<div style="display: flex;">
|
||||
<nz-input-number [(ngModel)]="data.place4" [nzMin]="1" [nzMax]="10" [nzStep]="1"></nz-input-number>
|
||||
<div class="left_btn">吨</div>
|
||||
</div>
|
||||
</ng-template>
|
||||
<sf #sf [schema]="schema" [ui]="{ '*': { spanLabelFixed: 90, grid: { span:24 } } }" [button]="'none'">
|
||||
</sf>
|
||||
<nz-divider></nz-divider>
|
||||
<nz-divider style="margin-top: 0;"></nz-divider>
|
||||
<div>
|
||||
<p style="font-weight: bolder;">总运费:<span style="color: red;">¥900.00</span></p>
|
||||
<p>运输费:¥800.00,附加费:¥100.00</p>
|
||||
</div>
|
||||
|
||||
<div class="modal-footer">
|
||||
<button nz-button type="button" (click)="close()">关闭</button>
|
||||
<button nz-button type="submit" nzType="primary" (click)="save(sf.value)" [disabled]="!sf.valid" [nzLoading]="http.loading"
|
||||
>确认</button
|
||||
>
|
||||
</div>
|
||||
<p style="font-size: 16px;">
|
||||
<span style="font-weight: bolder">总运费:<span style="color: #dc112a">¥{{ data.totalFreight }}</span></span>
|
||||
</p>
|
||||
<p style="margin-bottom: 0;"> 运输费:¥{{ data.freight }},附加费:¥{{ data.surcharge }}</p>
|
||||
</div>
|
||||
@ -1,4 +1,3 @@
|
||||
import { preloaderFinished } from '@delon/theme';
|
||||
/*
|
||||
* @Author: your name
|
||||
* @Date: 2021-12-14 14:03:07
|
||||
@ -7,20 +6,12 @@ import { preloaderFinished } from '@delon/theme';
|
||||
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
||||
* @FilePath: \tms-obc-web\src\app\routes\order-management\modal\bulk\update-freight\update-freight.component.ts
|
||||
*/
|
||||
import { Component, OnInit, ViewChild } from '@angular/core';
|
||||
import { Component, Input, OnInit, ViewChild } from '@angular/core';
|
||||
import {
|
||||
SFComponent,
|
||||
SFCustomWidgetSchema,
|
||||
SFNumberWidgetSchema,
|
||||
SFRadioWidgetSchema,
|
||||
SFSchema,
|
||||
SFComponent, SFNumberWidgetSchema, SFSchema,
|
||||
SFSelectWidgetSchema,
|
||||
SFTextareaWidgetSchema,
|
||||
SFUISchema
|
||||
SFStringWidgetSchema, SFTextWidgetSchema
|
||||
} from '@delon/form';
|
||||
import { _HttpClient } from '@delon/theme';
|
||||
import { NzMessageService } from 'ng-zorro-antd/message';
|
||||
import { NzModalRef } from 'ng-zorro-antd/modal';
|
||||
|
||||
@Component({
|
||||
selector: 'app-order-management-update-freight',
|
||||
@ -28,116 +19,154 @@ import { NzModalRef } from 'ng-zorro-antd/modal';
|
||||
styleUrls: ['./update-freight.component.less']
|
||||
})
|
||||
export class UpdateFreightComponent implements OnInit {
|
||||
record: any = {};
|
||||
i: any;
|
||||
@ViewChild('sf', { static: false }) sf!: SFComponent;
|
||||
schema: SFSchema = {};
|
||||
ui: SFUISchema = {};
|
||||
data: any = {};
|
||||
constructor(private modal: NzModalRef, private msgSrv: NzMessageService, public http: _HttpClient) {}
|
||||
schema!: SFSchema;
|
||||
|
||||
@Input()
|
||||
data: any;
|
||||
|
||||
constructor() {}
|
||||
|
||||
ngOnInit(): void {
|
||||
this.initSF();
|
||||
|
||||
if (this.record.id > 0) this.http.get(`/user/${this.record.id}`).subscribe(res => (this.i = res));
|
||||
}
|
||||
initSF() {
|
||||
this.schema= {
|
||||
properties: {
|
||||
no: {
|
||||
type: 'string',
|
||||
title: '运费单价',
|
||||
ui: {
|
||||
widget: 'custom',
|
||||
}
|
||||
},
|
||||
sex: {
|
||||
title: '',
|
||||
type: 'string',
|
||||
enum: [
|
||||
{ label: '保留小数', value: 0 },
|
||||
{ label: '男', value: 1 },
|
||||
{ label: '女', value: 2 },
|
||||
{ label: '保密', value: 3 },
|
||||
],
|
||||
ui: {
|
||||
widget: 'select',
|
||||
} as SFSelectWidgetSchema,
|
||||
},
|
||||
appId: {
|
||||
type: 'string',
|
||||
title: '结算依据',
|
||||
ui: {
|
||||
width: 300,
|
||||
grid: { span: 24 },
|
||||
widget: 'select',
|
||||
placeholder: '请选择',
|
||||
allowClear: true,
|
||||
// asyncData: () => this.getCatalogueMember(),
|
||||
},
|
||||
},
|
||||
no2: {
|
||||
type: 'string',
|
||||
title: '装货重量',
|
||||
ui: {
|
||||
widget: 'custom',
|
||||
}
|
||||
},
|
||||
no3: {
|
||||
type: 'string',
|
||||
title: '装货体积',
|
||||
ui: {
|
||||
widget: 'custom',
|
||||
}
|
||||
},
|
||||
no4: {
|
||||
type: 'string',
|
||||
title: '卸货重量',
|
||||
ui: {
|
||||
widget: 'custom',
|
||||
}
|
||||
},
|
||||
no5: {
|
||||
type: 'string',
|
||||
title: '卸货体积',
|
||||
ui: {
|
||||
widget: 'custom',
|
||||
}
|
||||
},
|
||||
name3: {
|
||||
type: 'string',
|
||||
title: '变更原因',
|
||||
maxLength: 100,
|
||||
ui: {
|
||||
width: 300,
|
||||
placeholder:"选填,最多不超过100字",
|
||||
widget: 'textarea',
|
||||
autosize: { minRows: 3, maxRows: 6 }
|
||||
} as SFTextareaWidgetSchema
|
||||
},
|
||||
},
|
||||
required: ['no', 'appId'],
|
||||
type: 'object',
|
||||
};
|
||||
this.ui = { '*': { spanLabelFixed: 100, grid: { span: 12, gutter: 4 } }
|
||||
};
|
||||
}
|
||||
save(value: any): void {
|
||||
console.log(value)
|
||||
console.log(this.data)
|
||||
this.http.post(`/user/${this.record.id}`, value).subscribe(res => {
|
||||
this.msgSrv.success('保存成功');
|
||||
this.modal.close(true);
|
||||
});
|
||||
this.schema = this.initSF(this.data);
|
||||
}
|
||||
|
||||
close(): void {
|
||||
this.modal.destroy();
|
||||
}
|
||||
/**
|
||||
* 更新数字框
|
||||
* @param value
|
||||
* @param type
|
||||
* 初始化表单
|
||||
*/
|
||||
changeNumVal(value: any, type: number) {}
|
||||
private initSF(data: any): SFSchema {
|
||||
return {
|
||||
properties: {
|
||||
dto: {
|
||||
type: 'object',
|
||||
properties: {
|
||||
freightPrice: {
|
||||
type: 'string',
|
||||
title: '运费单价',
|
||||
ui: {
|
||||
addOnAfter: data.freightTypeLabel,
|
||||
placeholder: '请输入',
|
||||
grid: {
|
||||
span: 12
|
||||
}
|
||||
} as SFStringWidgetSchema,
|
||||
default: data.freightPrice
|
||||
},
|
||||
rule: {
|
||||
title: '',
|
||||
type: 'string',
|
||||
default: data.rule,
|
||||
enum: [
|
||||
{ label: '保留小数', value: '1' },
|
||||
{ label: '抹除小数', value: '2' },
|
||||
{ label: '抹除个数', value: '3' }
|
||||
],
|
||||
ui: {
|
||||
widget: 'select',
|
||||
spanLabelFixed: 10,
|
||||
grid: {
|
||||
span: 10
|
||||
}
|
||||
} as SFSelectWidgetSchema
|
||||
},
|
||||
settlementBasis: {
|
||||
title: '结算依据',
|
||||
type: 'string',
|
||||
default: data.settlementBasis,
|
||||
enum: [
|
||||
{ label: '以收货为准', value: '1' },
|
||||
{ label: '以发货为准', value: '2' }
|
||||
],
|
||||
ui: {
|
||||
widget: 'select',
|
||||
grid: {
|
||||
span: 12
|
||||
}
|
||||
} as SFSelectWidgetSchema
|
||||
},
|
||||
blank1: {
|
||||
title: '',
|
||||
type: 'string',
|
||||
ui: { widget: 'text', grid: { span: 12 }, class: 'input-back' },
|
||||
default: ' '
|
||||
},
|
||||
freightType: {
|
||||
title: '',
|
||||
type: 'string',
|
||||
ui: { hidden: true },
|
||||
default: data.freightType
|
||||
},
|
||||
acceptWeight: {
|
||||
type: 'number',
|
||||
title: '装货重量',
|
||||
default: data.acceptWeight,
|
||||
ui: {
|
||||
unit: '吨',
|
||||
placeholder: '请输入',
|
||||
grid: {
|
||||
span: 12
|
||||
},
|
||||
hideStep: true
|
||||
} as SFNumberWidgetSchema
|
||||
},
|
||||
acceptVolume: {
|
||||
type: 'number',
|
||||
title: '装货体积',
|
||||
default: data.acceptVolume,
|
||||
ui: {
|
||||
unit: '吨',
|
||||
placeholder: '请输入',
|
||||
grid: {
|
||||
span: 12
|
||||
},
|
||||
hideStep: true
|
||||
} as SFNumberWidgetSchema
|
||||
},
|
||||
settlementWeight: {
|
||||
type: 'number',
|
||||
title: '卸货重量',
|
||||
default: data.settlementWeight,
|
||||
ui: {
|
||||
unit: '吨',
|
||||
placeholder: '请输入',
|
||||
grid: {
|
||||
span: 12
|
||||
},
|
||||
hideStep: true
|
||||
} as SFNumberWidgetSchema
|
||||
},
|
||||
settlementVolume: {
|
||||
type: 'number',
|
||||
title: '卸货体积',
|
||||
default: data.settlementVolume,
|
||||
ui: {
|
||||
unit: '吨',
|
||||
placeholder: '请输入',
|
||||
grid: {
|
||||
span: 12
|
||||
},
|
||||
hideStep: true
|
||||
} as SFNumberWidgetSchema
|
||||
}
|
||||
},
|
||||
required: ['freightPrice', 'settlementBasis']
|
||||
},
|
||||
changeCause: {
|
||||
title: '审核备注',
|
||||
type: 'string',
|
||||
maxLength: 100,
|
||||
default: data.changeCause,
|
||||
ui: {
|
||||
widget: 'textarea',
|
||||
span: 24,
|
||||
placeholder: '选填,最多不超过100字',
|
||||
autosize: {
|
||||
minRows: 3,
|
||||
maxRows: 5
|
||||
}
|
||||
} as SFTextWidgetSchema
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user