This commit is contained in:
wangshiming
2021-12-15 15:54:10 +08:00
parent 3ff0fef50e
commit a82c732e59
12 changed files with 141 additions and 124 deletions

View File

@ -1,7 +1,7 @@
<!--
* @Author: your name
* @Date: 2021-12-03 11:10:14
* @LastEditTime: 2021-12-14 15:47:08
* @LastEditTime: 2021-12-15 14:25:34
* @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\supply-management\components\vehicle\vehicle.component.html
@ -84,7 +84,6 @@
<ng-container *nzModalContent>
<st
#stFloat
multiSort
size="small"
[bordered]="true"
[data]="datass"

View File

@ -613,7 +613,7 @@ export class OrderManagementBulkComponent implements OnInit {
});
}
// *变更运费
// *确认签收
confirmReceipt(item: any) {
const modalRef = this.modal.create({
@ -626,7 +626,7 @@ export class OrderManagementBulkComponent implements OnInit {
nzFooter: null
});
}
// *变更运费
// *确认发车
sureDepart(item: any) {
const modalRef = this.modal.create({
@ -639,7 +639,7 @@ export class OrderManagementBulkComponent implements OnInit {
nzFooter: null
});
}
// *变更运费
// *确认到车
sureArrive(item: any) {
const modalRef = this.modal.create({

View File

@ -5,6 +5,10 @@ import { ModalHelper, _HttpClient } from '@delon/theme';
import { NzModalService } from 'ng-zorro-antd/modal';
import { of } from 'rxjs';
import { map } from 'rxjs/operators';
import { VehicleConfirReceiptComponent } from '../../modal/vehicle/confir-receipt/confir-receipt.component';
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 { SupplyManagementService } from '../../services/order-management.service';
@ -354,6 +358,7 @@ export class OrderManagementVehicleComponent implements OnInit {
title: '操作',
fixed: 'right',
width: '200px',
className: 'text-left',
buttons: [
{
text: '查看评价',
@ -363,6 +368,26 @@ export class OrderManagementVehicleComponent implements OnInit {
text: '运费变更记录',
click: (_record) => this.OpenPrice(),
},
{
text: '变更运费',
click: (_record) => this.updateFreight(_record),
},
{
text: '确认签收',
click: (_record) => this.confirmReceipt(_record),
},
{
text: '取消订单',
click: (_record) => this.confirmReceipt(_record),
},
{
text: '确认发车',
click: (_record) => this.sureDepart(_record),
},
{
text: '确认到车',
click: (_record) => this.sureArrive(_record),
},
],
},
];
@ -512,4 +537,57 @@ export class OrderManagementVehicleComponent implements OnInit {
console.log(item)
this.isVisibleEvaluate = true
}
/**
*变更运费
*/
updateFreight(item: any) {
const modalRef = this.modal.create({
nzTitle: '变更运费',
nzWidth: '50%',
nzContent: VehicleUpdateFreightComponent,
nzComponentParams: {
i: item
},
nzFooter: null
});
}
// *确认签收
confirmReceipt(item: any) {
const modalRef = this.modal.create({
nzTitle: '确认签收',
nzWidth: '50%',
nzContent: VehicleConfirReceiptComponent,
nzComponentParams: {
i: item
},
nzFooter: null
});
}
// *确认发车
sureDepart(item: any) {
const modalRef = this.modal.create({
nzTitle: '确认发车',
nzWidth: '50%',
nzContent: VehicleSureDepartComponent,
nzComponentParams: {
i: item
},
nzFooter: null
});
}
// 确认到车
sureArrive(item: any) {
const modalRef = this.modal.create({
nzTitle: '确认到车',
nzWidth: '50%',
nzContent: VehicleSureArriveComponent,
nzComponentParams: {
i: item
},
nzFooter: null
});
}
}

View File

@ -2,7 +2,7 @@ import { preloaderFinished } from '@delon/theme';
/*
* @Author: your name
* @Date: 2021-12-14 14:03:07
* @LastEditTime: 2021-12-14 15:43:12
* @LastEditTime: 2021-12-15 14:08:34
* @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
@ -23,11 +23,11 @@ import { NzMessageService } from 'ng-zorro-antd/message';
import { NzModalRef } from 'ng-zorro-antd/modal';
@Component({
selector: 'app-order-management-confir-receipt',
selector: 'app-order-management-vehicle-confir-receipt',
templateUrl: './confir-receipt.component.html',
styleUrls: ['./confir-receipt.component.less']
})
export class ConfirReceiptComponent implements OnInit {
export class VehicleConfirReceiptComponent implements OnInit {
record: any = {};
i:any;
data: any = {};

View File

@ -27,11 +27,11 @@ import { SupplyManagementService } from 'src/app/routes/supply-management/servic
import { Observable, Observer } from 'rxjs';
@Component({
selector: 'app-order-management-sure-arrive',
selector: 'app-order-management-vehicle-sure-arrive',
templateUrl: './sure-arrive.component.html',
styleUrls: ['./sure-arrive.component.less']
})
export class SureArriveComponent implements OnInit {
export class VehicleSureArriveComponent implements OnInit {
record: any = {};
i: any;
data: any ={

View File

@ -27,11 +27,11 @@ import { SupplyManagementService } from 'src/app/routes/supply-management/servic
import { Observable, Observer } from 'rxjs';
@Component({
selector: 'app-order-management-sure-depart',
selector: 'app-order-management-vehicle-sure-depart',
templateUrl: './sure-depart.component.html',
styleUrls: ['./sure-depart.component.less']
})
export class SureDepartComponent implements OnInit {
export class VehicleSureDepartComponent implements OnInit {
record: any = {};
i: any;
data: any ={

View File

@ -1,48 +1,17 @@
<!--
* @Author: your name
* @Date: 2021-12-14 14:03:07
* @LastEditTime: 2021-12-14 15:16:40
* @LastEditTime: 2021-12-15 15:53:02
* @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
-->
<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>
<nz-divider></nz-divider>
<div>
<p style="font-weight: bolder;">总运费:<span style="color: red;">900.00</span></p>
<p>运输费:¥800.00附加费¥100.00</p>
<p style="font-weight: bolder;">总运费:<span style="color: red;">{{gross}}</span></p>
<p>运输费:¥{{transportation}},附加费:¥{{additional}}</p>
</div>
<div class="modal-footer">

View File

@ -2,7 +2,7 @@ import { preloaderFinished } from '@delon/theme';
/*
* @Author: your name
* @Date: 2021-12-14 14:03:07
* @LastEditTime: 2021-12-14 15:16:27
* @LastEditTime: 2021-12-15 15:52:36
* @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
@ -23,11 +23,11 @@ import { NzMessageService } from 'ng-zorro-antd/message';
import { NzModalRef } from 'ng-zorro-antd/modal';
@Component({
selector: 'app-order-management-update-freight',
selector: 'app-order-management-vehicle-update-freight',
templateUrl: './update-freight.component.html',
styleUrls: ['./update-freight.component.less']
})
export class UpdateFreightComponent implements OnInit {
export class VehicleUpdateFreightComponent implements OnInit {
record: any = {};
i: any;
@ViewChild('sf', { static: false }) sf!: SFComponent;
@ -41,88 +41,49 @@ export class UpdateFreightComponent implements OnInit {
if (this.record.id > 0) this.http.get(`/user/${this.record.id}`).subscribe(res => (this.i = res));
}
// 运输费
get transportation () {
console.log(this.sf?.value)
const value = Number(this.sf?.value?.number || 0) + Number(this.sf?.value?.number2 || 0) + Number(this.sf?.value?.number3 || 0)
console.log( value )
return value || 0
}
// 总运费
get gross () {
const value = Number(this.transportation || 0) + Number(this.transportation || 0)
console.log( value )
return value || 0
}
// 附加费
get additional () {
return 100
}
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',
}
},
number: { type: 'number',title: '预付' ,minimum: 1, maximum: 999999999, multipleOf: 1, ui: { widgetWidth: 200 } },
number2: { type: 'number',title: '到付' ,minimum: 1, maximum: 999999999, multipleOf: 1, ui: { widgetWidth: 200 } },
number3: { type: 'number',title: '回单付' ,minimum: 1, maximum: 999999999, multipleOf: 1, ui: { widgetWidth: 200 } },
name3: {
type: 'string',
title: '变更原因',
maxLength: 100,
ui: {
width: 300,
widgetWidth: 300,
placeholder:"选填最多不超过100字",
widget: 'textarea',
autosize: { minRows: 3, maxRows: 6 }
} as SFTextareaWidgetSchema
},
},
required: ['no', 'appId'],
required: ['name3'],
type: 'object',
};
this.ui = { '*': { spanLabelFixed: 100, grid: { span: 12, gutter: 4 } }
this.ui = { '*': { spanLabelFixed: 100, grid: { span: 16,gutter:8 } }
};
}
save(value: any): void {
console.log(this.sf.value)
console.log(value)
console.log(this.data)
this.http.post(`/user/${this.record.id}`, value).subscribe(res => {

View File

@ -1,7 +1,7 @@
/*
* @Author: your name
* @Date: 2021-12-03 15:31:52
* @LastEditTime: 2021-12-14 15:55:50
* @LastEditTime: 2021-12-15 14:09:53
* @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\order-management.module.ts
@ -23,6 +23,10 @@ import { ConfirReceiptComponent } from './modal/bulk/confir-receipt/confir-recei
import { SureArriveComponent } from './modal/bulk/sure-arrive/sure-arrive.component';
import { SureDepartComponent } from './modal/bulk/sure-depart/sure-depart.component';
import { UpdateFreightComponent } from './modal/bulk/update-freight/update-freight.component';
import { VehicleConfirReceiptComponent } from './modal/vehicle/confir-receipt/confir-receipt.component';
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 { OrderManagementRoutingModule } from './order-management-routing.module';
const COMPONENTS: Type<void>[] = [
@ -39,7 +43,11 @@ const COMPONENTS: Type<void>[] = [
UpdateFreightComponent,
ConfirReceiptComponent,
SureDepartComponent,
SureArriveComponent
SureArriveComponent,
VehicleUpdateFreightComponent,
VehicleConfirReceiptComponent,
VehicleSureDepartComponent,
VehicleSureArriveComponent,
];
@NgModule({