车辆对接
This commit is contained in:
@ -1,7 +1,7 @@
|
||||
<!--
|
||||
* @Author: your name
|
||||
* @Date: 2021-12-03 11:10:14
|
||||
* @LastEditTime: 2021-12-15 14:25:34
|
||||
* @LastEditTime: 2021-12-20 17:11:27
|
||||
* @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
|
||||
@ -47,7 +47,7 @@
|
||||
#st
|
||||
[bordered]="true"
|
||||
[scroll]="{ x: '2000px' }"
|
||||
[data]="service.$api_get_bulkPage_list"
|
||||
[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' } }"
|
||||
@ -55,9 +55,28 @@
|
||||
[loadingDelay]="500"
|
||||
[loading]="service.http.loading"
|
||||
>
|
||||
<ng-template st-row="goodsId" let-item let-index="index">
|
||||
<a [routerLink]="'/order-management/bulk-detail/'+item.id">{{item.id}}</a>
|
||||
</ng-template>
|
||||
<ng-template st-row="billCode" let-item let-index="index">
|
||||
<a [routerLink]="'/waybill-management/vehicle-detail/'+item.id">{{item.wayBillCode}}</a>
|
||||
<div>
|
||||
<span>{{item?.billStatusLabel}}</span>
|
||||
</div>
|
||||
</ng-template>
|
||||
<ng-template st-row="goodsName" let-item let-index="index">
|
||||
<div>{{item?.goodsName}}</div>
|
||||
<div>
|
||||
<span>{{item?.weight ? item?.weight + '吨/' : '' }}</span>
|
||||
<span>{{item?.volume ? item?.volume + '方/' : '' }}</span>
|
||||
<span>{{item?.goodsNumber ? item?.goodsNumber + '吨' : '' }}</span>
|
||||
</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">
|
||||
{{ data.expenseName }}:{{ data.price }}
|
||||
<span *ngIf="data.paymentStatus" style="color: #f59a63">{{ data.paymentStatus }}</span>
|
||||
</p>
|
||||
</div>
|
||||
</ng-template>
|
||||
<!-- <ng-template st-row="externalSn" let-item let-index="index">
|
||||
<span class="mr-xs">{{111111}}</span>
|
||||
<a (click)="editEnternalSn(item)">编辑</a>
|
||||
@ -93,6 +112,14 @@
|
||||
[page]="{ show: true, showSize: true, pageSizes: [10, 20, 30, 50, 100, 200, 300, 500, 1000] }"
|
||||
[loadingDelay]="500"
|
||||
>
|
||||
<ng-template st-row="externalSn" let-item let-index="index">
|
||||
<div>
|
||||
<span *ngIf="item?.externalSn == '1'">待确认</span>
|
||||
<span *ngIf="item?.externalSn == '2'">已确认</span>
|
||||
<span *ngIf="item?.externalSn == '3'">已撤销</span>
|
||||
<span *ngIf="item?.externalSn == '4'">拒绝</span>
|
||||
</div>
|
||||
</ng-template>
|
||||
</st>
|
||||
</ng-container>
|
||||
<ng-template #nzModalFooter>
|
||||
|
||||
@ -10,6 +10,7 @@ import { ConfirReceiptComponent } from '../../modal/bulk/confir-receipt/confir-r
|
||||
import { SureDepartComponent } from '../../modal/bulk/sure-depart/sure-depart.component';
|
||||
import { SureArriveComponent } from '../../modal/bulk/sure-arrive/sure-arrive.component';
|
||||
import { of } from 'rxjs';
|
||||
import { ShipperBaseService } from '@shared';
|
||||
|
||||
|
||||
@Component({
|
||||
@ -82,7 +83,7 @@ export class OrderManagementBulkComponent implements OnInit {
|
||||
count: 0,
|
||||
},
|
||||
];
|
||||
constructor(public service: OrderManagementService, private modal: NzModalService) { }
|
||||
constructor(public service: OrderManagementService, private modal: NzModalService,public service2: ShipperBaseService) { }
|
||||
|
||||
/**
|
||||
* 查询参数
|
||||
@ -112,37 +113,37 @@ export class OrderManagementBulkComponent implements OnInit {
|
||||
this.schema = {
|
||||
properties: {
|
||||
_$expand: { type: 'boolean', ui: { hidden: true } },
|
||||
no: {
|
||||
billCode: {
|
||||
type: 'string',
|
||||
title: '订单号',
|
||||
title: '订单号'
|
||||
},
|
||||
no2: {
|
||||
resourceCode: {
|
||||
type: 'string',
|
||||
title: '货源编号'
|
||||
},
|
||||
no1: {
|
||||
shipperAppUserId: {
|
||||
type: 'string',
|
||||
title: '货主'
|
||||
},
|
||||
no3: {
|
||||
loadingPlace: {
|
||||
type: 'string',
|
||||
title: '装货地',
|
||||
ui: {
|
||||
visibleIf: {
|
||||
_$expand: (value: boolean) => value,
|
||||
},
|
||||
_$expand: (value: boolean) => value
|
||||
}
|
||||
}
|
||||
},
|
||||
no4: {
|
||||
dischargePlace: {
|
||||
type: 'string',
|
||||
title: '卸货地',
|
||||
ui: {
|
||||
visibleIf: {
|
||||
_$expand: (value: boolean) => value,
|
||||
},
|
||||
_$expand: (value: boolean) => value
|
||||
}
|
||||
}
|
||||
},
|
||||
brandId: {
|
||||
driverId: {
|
||||
title: '承运司机',
|
||||
type: 'string',
|
||||
ui: {
|
||||
@ -153,29 +154,45 @@ export class OrderManagementBulkComponent implements OnInit {
|
||||
onSearch: (q: any) => {
|
||||
if (!!q) {
|
||||
return this.service
|
||||
.request(this.service.$api_get_getDriverInfo, { keyword: q,
|
||||
model: 1, type: 1 })
|
||||
.pipe(map((res) => (res as any[]).map((i) => ({ label: i.name, value: i.id } as SFSchemaEnum))))
|
||||
.request(this.service.$api_get_getDriverInfo, { keyword: q, model: 1, type: 1 })
|
||||
.pipe(map(res => (res as any[]).map(i => ({ label: i.name, value: i.id } as SFSchemaEnum))))
|
||||
.toPromise();
|
||||
} else {
|
||||
return of([]);
|
||||
}
|
||||
},
|
||||
visibleIf: {
|
||||
expand: (value: boolean) => value,
|
||||
},
|
||||
} as SFSelectWidgetSchema,
|
||||
_$expand: (value: boolean) => value
|
||||
}
|
||||
} as SFSelectWidgetSchema
|
||||
},
|
||||
no9: {
|
||||
type: 'string',
|
||||
|
||||
carNo: {
|
||||
title: '车牌号',
|
||||
type: 'string',
|
||||
ui: {
|
||||
widget: 'select',
|
||||
serverSearch: true,
|
||||
searchDebounceTime: 300,
|
||||
searchLoadingText: '搜索中...',
|
||||
onSearch: (q: any) => {
|
||||
if (!!q) {
|
||||
return this.service
|
||||
.request(this.service.$api_get_getCarLicenseListByCarNo, {
|
||||
carNo: q
|
||||
})
|
||||
.pipe(map((res: any[]) => (res as any[]).map((i) => ({ label: i.carNo, value: i.carNo } as SFSchemaEnum))))
|
||||
.toPromise();
|
||||
} else {
|
||||
return of([]);
|
||||
}
|
||||
},
|
||||
visibleIf: {
|
||||
_$expand: (value: boolean) => value,
|
||||
},
|
||||
}
|
||||
},
|
||||
payeeId: {
|
||||
} as SFSelectWidgetSchema,
|
||||
},
|
||||
payeeId: {
|
||||
title: '车队长',
|
||||
type: 'string',
|
||||
ui: {
|
||||
@ -195,22 +212,17 @@ export class OrderManagementBulkComponent implements OnInit {
|
||||
}
|
||||
},
|
||||
visibleIf: {
|
||||
expand: (value: boolean) => value,
|
||||
_$expand: (value: boolean) => value,
|
||||
},
|
||||
} as SFSelectWidgetSchema,
|
||||
},
|
||||
sex: {
|
||||
paymentstatus: {
|
||||
title: '支付状态',
|
||||
type: 'string',
|
||||
default: 0,
|
||||
enum: [
|
||||
{ label: '未知', value: 0 },
|
||||
{ label: '男', value: 1 },
|
||||
{ label: '女', value: 2 },
|
||||
{ label: '保密', value: 3 },
|
||||
],
|
||||
ui: {
|
||||
widget: 'select',
|
||||
widget: 'dict-select',
|
||||
params: { dictKey: 'payment:status' },
|
||||
containAllLable:true,
|
||||
visibleIf: {
|
||||
_$expand: (value: boolean) => value,
|
||||
},
|
||||
@ -224,24 +236,28 @@ export class OrderManagementBulkComponent implements OnInit {
|
||||
mode: 'range',
|
||||
format: 'yyyy-MM-dd',
|
||||
visibleIf: {
|
||||
_$expand: (value: boolean) => value,
|
||||
},
|
||||
} as SFDateWidgetSchema,
|
||||
_$expand: (value: boolean) => value
|
||||
}
|
||||
} as SFDateWidgetSchema
|
||||
},
|
||||
appId: {
|
||||
isRiskSheet: {
|
||||
type: 'string',
|
||||
title: '是否风险单',
|
||||
default: '0',
|
||||
enum: [
|
||||
{ label: '全部', value: '0' },
|
||||
{ label: '是', value: '1' },
|
||||
{ label: '否', value: '2' }
|
||||
],
|
||||
ui: {
|
||||
widget: 'select',
|
||||
placeholder: '请选择',
|
||||
visibleIf: {
|
||||
_$expand: (value: boolean) => value,
|
||||
},
|
||||
allowClear: true,
|
||||
asyncData: () => this.getCatalogueMember(),
|
||||
},
|
||||
},
|
||||
appId2: {
|
||||
enterpriseInfoName: {
|
||||
type: 'string',
|
||||
title: '网络货运人',
|
||||
ui: {
|
||||
@ -251,23 +267,10 @@ export class OrderManagementBulkComponent implements OnInit {
|
||||
_$expand: (value: boolean) => value,
|
||||
},
|
||||
allowClear: true,
|
||||
asyncData: () => this.getCatalogueMember(),
|
||||
asyncData: () => this.service2.getNetworkFreightForwarder(),
|
||||
},
|
||||
},
|
||||
appId3: {
|
||||
type: 'string',
|
||||
title: '结算依据',
|
||||
ui: {
|
||||
widget: 'dict-select',
|
||||
params: { dictKey: 'goodresource:settlement:type' },
|
||||
containAllLable:true,
|
||||
placeholder: '请选择',
|
||||
visibleIf: {
|
||||
_$expand: (value: boolean) => value,
|
||||
},
|
||||
},
|
||||
},
|
||||
appId4: {
|
||||
goodsName: {
|
||||
type: 'string',
|
||||
title: '货物名称',
|
||||
ui: {
|
||||
@ -294,7 +297,7 @@ export class OrderManagementBulkComponent implements OnInit {
|
||||
} as SFSelectWidgetSchema,
|
||||
},
|
||||
},
|
||||
type: 'object',
|
||||
type: 'object'
|
||||
};
|
||||
this.ui = { '*': { spanLabelFixed: 110, grid: { span: 8, gutter: 4 } } };
|
||||
}
|
||||
@ -351,71 +354,70 @@ export class OrderManagementBulkComponent implements OnInit {
|
||||
title: '订单号',
|
||||
width: '100px',
|
||||
className: 'text-center',
|
||||
render: 'goodsId'
|
||||
render: 'billCode'
|
||||
},
|
||||
{
|
||||
title: '运费明细',
|
||||
width: '100px',
|
||||
index: 'externalSn',
|
||||
className: 'text-center',
|
||||
render: 'mybidDetailInfo',
|
||||
},
|
||||
{ title: '网络货运人', index: 'externalSn', width: '120px', className: 'text-center' },
|
||||
{ title: '托运人', index: 'externalSn', width: '120px', className: 'text-center' },
|
||||
{ title: '关联运单号', index: 'externalSn', width: '120px', className: 'text-center' },
|
||||
{ title: '货源编号', index: 'externalSn', width: '120px', className: 'text-center' },
|
||||
{ title: '装货地', index: 'linkUrl', width: '120px', className: 'text-center' },
|
||||
{ title: '网络货运人', index: 'enterpriseInfoName', width: '120px', className: 'text-center' },
|
||||
{ title: '托运人', index: 'enterpriseProjectName', width: '120px', className: 'text-center' },
|
||||
{ title: '关联运单号', index: 'wayBillCode', width: '120px', className: 'text-center' },
|
||||
{ title: '货源编号', index: 'resourceCode', width: '120px', className: 'text-center' },
|
||||
{ title: '装货地', index: 'loadingAddressArr', width: '120px', className: 'text-center' },
|
||||
{
|
||||
title: '卸货地',
|
||||
className: 'text-center',
|
||||
width: '120px',
|
||||
index: 'unloadingAddressArr'
|
||||
},
|
||||
{
|
||||
title: '货物信息',
|
||||
className: 'text-center',
|
||||
width: '120px',
|
||||
},
|
||||
{
|
||||
render: 'goodsName'
|
||||
}, {
|
||||
title: '运费单价',
|
||||
className: 'text-center',
|
||||
width: '120px',
|
||||
index: 'freightPrice'
|
||||
},
|
||||
{
|
||||
title: '接单数量',
|
||||
className: 'text-center',
|
||||
width: '120px',
|
||||
index: 'goodsNumber',
|
||||
width: '100px',
|
||||
},
|
||||
{
|
||||
title: '结算重量',
|
||||
className: 'text-center',
|
||||
width: '120px',
|
||||
},
|
||||
{
|
||||
title: '接单重量',
|
||||
className: 'text-center',
|
||||
width: '120px',
|
||||
index: 'settlementWeight',
|
||||
width: '100px',
|
||||
},
|
||||
{
|
||||
title: '承运司机',
|
||||
className: 'text-center',
|
||||
width: '120px',
|
||||
render: 'feiong'
|
||||
index: 'driverName',
|
||||
width: '100px',
|
||||
},
|
||||
{
|
||||
title: '收款人',
|
||||
className: 'text-center',
|
||||
width: '120px',
|
||||
index: 'payeeName',
|
||||
width: '100px',
|
||||
},
|
||||
{
|
||||
title: '装卸货时间',
|
||||
width: '170px',
|
||||
className: 'text-center',
|
||||
width: '120px',
|
||||
render: 'enStatusStr27878'
|
||||
render: 'loadingTime'
|
||||
},
|
||||
{
|
||||
title: '创建时间',
|
||||
className: 'text-center',
|
||||
width: '120px',
|
||||
|
||||
index: 'createTime',
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
@ -472,7 +474,7 @@ export class OrderManagementBulkComponent implements OnInit {
|
||||
className: 'text-center',
|
||||
index: 'three',
|
||||
},
|
||||
{ title: '状态', index: 'externalSn', className: 'text-center' },
|
||||
{ title: '状态', render: 'externalSn', className: 'text-center' },
|
||||
{
|
||||
title: '操作',
|
||||
fixed: 'right',
|
||||
@ -485,6 +487,7 @@ export class OrderManagementBulkComponent implements OnInit {
|
||||
{
|
||||
text: '撤销',
|
||||
click: (_record) => this.audit(_record),
|
||||
iif: item => item.externalSn === '1' || item.externalSn === 1,
|
||||
},
|
||||
],
|
||||
},
|
||||
@ -635,7 +638,8 @@ export class OrderManagementBulkComponent implements OnInit {
|
||||
nzWidth: '50%',
|
||||
nzContent: SureDepartComponent,
|
||||
nzComponentParams: {
|
||||
i: item
|
||||
i: item,
|
||||
Status: 1
|
||||
},
|
||||
nzFooter: null
|
||||
});
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
<!--
|
||||
* @Author: your name
|
||||
* @Date: 2021-12-03 11:10:14
|
||||
* @LastEditTime: 2021-12-20 09:56:30
|
||||
* @LastEditTime: 2021-12-20 17:07:17
|
||||
* @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
|
||||
@ -47,30 +47,62 @@
|
||||
#st
|
||||
[bordered]="true"
|
||||
[scroll]="{ x: '2000px' }"
|
||||
[data]="service.$api_get_getWholeBillDetail"
|
||||
[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' } }"
|
||||
[page]="{ show: true, showSize: true, pageSizes: [10, 20, 30, 50, 100, 200, 300, 500, 1000] }"
|
||||
[loadingDelay]="500"
|
||||
[loading]="service.http.loading"
|
||||
|
||||
>
|
||||
<ng-template st-row="billCode" let-item let-index="index">
|
||||
<a [routerLink]="'/waybill-management/vehicle-detail/'+item.id">{{item.wayBillCode}}</a>
|
||||
<div>
|
||||
<span *ngIf="item?.wayBillStatus == 1">待接单</span>
|
||||
<span *ngIf="item?.wayBillStatus == 2">待发车</span>
|
||||
<span *ngIf="item?.wayBillStatus == 3">运输中</span>
|
||||
<span *ngIf="item?.wayBillStatus == 4">待签收</span>
|
||||
<span *ngIf="item?.wayBillStatus == 5">已完成</span>
|
||||
<span *ngIf="item?.wayBillStatus == 6">已取消</span>
|
||||
<span>{{item?.billStatusLabel}}</span>
|
||||
</div>
|
||||
</ng-template>
|
||||
<ng-template st-row="goodsName" let-item let-index="index">
|
||||
<div>{{item?.goodsName}}</div>
|
||||
<div>
|
||||
<span>{{item?.weight ? item?.weight + '吨/' : '' }}</span>
|
||||
<span>{{item?.volume ? item?.volume + '方/' : '' }}</span>
|
||||
<span>{{item?.goodsNumber ? item?.goodsNumber + '吨' : '' }}</span>
|
||||
</div>
|
||||
</ng-template>
|
||||
<!-- 运费明细 -->
|
||||
<!-- <ng-template st-row="mybidDetailInfo" let-item let-index="index">
|
||||
<div *ngFor="let i of item?.mybidDetailInfo">
|
||||
<div></div>
|
||||
</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">
|
||||
{{ data.expenseName }}:{{ data.price }}
|
||||
<span *ngIf="data.paymentStatus" style="color: #f59a63">{{ data.paymentStatus }}</span>
|
||||
</p>
|
||||
</div>
|
||||
</ng-template>
|
||||
<ng-template st-row="billExpenseDetailVOList" let-item let-index="index">
|
||||
<div *ngFor="let i of item?.billExpenseDetailVOList; let ii = index">
|
||||
<span >{{i?.costName}}:{{i?.price}}</span>
|
||||
</div>
|
||||
</ng-template>
|
||||
<ng-template st-row="driverName" let-item let-index="index">
|
||||
<div>
|
||||
{{item?.driverName}}
|
||||
</div>
|
||||
<div>
|
||||
{{item?.driverPhone}}
|
||||
</div>
|
||||
</ng-template>
|
||||
<ng-template st-row="payeeName" let-item let-index="index">
|
||||
<div>
|
||||
{{item?.payeeName}}
|
||||
</div>
|
||||
<div>
|
||||
{{item?.payeePhone}}
|
||||
</div>
|
||||
</ng-template>
|
||||
<ng-template st-row="loadingTime" let-item let-index="index">
|
||||
<div *ngIf="item?.loadingTime">装 | {{item?.loadingTime}}</div>
|
||||
<div *ngIf="item?.unloadingTime">卸 | {{item?.unloadingTime}}</div>
|
||||
@ -102,21 +134,23 @@
|
||||
</nz-card>
|
||||
|
||||
|
||||
<nz-modal [(nzVisible)]="isVisible" [nzWidth]="600" [nzFooter]="nzModalFooter" nzTitle="浮动费用" (nzOnOk)="handleOK()" (nzOnCancel)="handleCancel('0')">
|
||||
<nz-modal [(nzVisible)]="isVisible" [nzWidth]="600" [nzFooter]="nzModalFooter" nzTitle="运费变更记录" (nzOnOk)="handleOK()" (nzOnCancel)="handleCancel('0')">
|
||||
<ng-container *nzModalContent>
|
||||
<st
|
||||
#stFloat
|
||||
multiSort
|
||||
size="small"
|
||||
[bordered]="true"
|
||||
[data]="service.$api_get_getWholeBillDetail"
|
||||
[data]="service.$api_get_listChangeApply"
|
||||
[columns]="columnsFloat"
|
||||
[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] }"
|
||||
[req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' }, params: changeParams }"
|
||||
[res]="{ reName: { list: 'data', total: 'data.total' } }"
|
||||
[loadingDelay]="500"
|
||||
|
||||
>
|
||||
|
||||
<ng-template st-row="order" let-item let-index="index">
|
||||
{{ index + 1 }}
|
||||
</ng-template>
|
||||
</st>
|
||||
</ng-container>
|
||||
<ng-template #nzModalFooter>
|
||||
@ -133,11 +167,10 @@
|
||||
multiSort
|
||||
size="small"
|
||||
[bordered]="true"
|
||||
[data]="datass"
|
||||
[data]="service.$api_get_getChangeRecordWholeDetail"
|
||||
[columns]="columnsFloatView"
|
||||
[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] }"
|
||||
[req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' }, params: changeViewParams }"
|
||||
[res]="{ reName: { list: 'data', total: 'data.total' } }"
|
||||
[loadingDelay]="500"
|
||||
>
|
||||
</st>
|
||||
|
||||
@ -26,6 +26,8 @@ export class OrderManagementVehicleComponent implements OnInit {
|
||||
isVisibleView = false;
|
||||
isVisibleEvaluate = false;
|
||||
isVisible = false;
|
||||
changeId: any; // 主页面查看运费变更记录id - 用于运费变更记录
|
||||
changeViewId: any; // 查看运费变更记录id - 用于查看
|
||||
_$expand = false;
|
||||
@ViewChild('st') private readonly st!: STComponent;
|
||||
@ViewChild('stFloat') private readonly stFloat!: STComponent;
|
||||
@ -90,6 +92,16 @@ export class OrderManagementVehicleComponent implements OnInit {
|
||||
...this.sf?.value,
|
||||
};
|
||||
}
|
||||
get changeParams() {
|
||||
return {
|
||||
id: this.changeId
|
||||
};
|
||||
}
|
||||
get changeViewParams() {
|
||||
return {
|
||||
id: this.changeViewId
|
||||
};
|
||||
}
|
||||
get selectedRows() {
|
||||
return this.st?.list.filter((item) => item.checked) || [];
|
||||
}
|
||||
@ -314,33 +326,34 @@ export class OrderManagementVehicleComponent implements OnInit {
|
||||
title: '运费明细',
|
||||
width: '100px',
|
||||
className: 'text-center',
|
||||
render: 'billExpenseDetailVOList',
|
||||
render: 'mybidDetailInfo',
|
||||
},
|
||||
{ title: '网络货运人', index: 'enterpriseInfoId', width: '120px', className: 'text-center' },
|
||||
{ title: '货主', index: 'shipperAppUserId', width: '120px', className: 'text-center' },
|
||||
{ title: '关联运单号', index: 'linkUrl', width: '120px', className: 'text-center' },
|
||||
{ title: '网络货运人', index: 'enterpriseInfoName', width: '120px', className: 'text-center' },
|
||||
{ title: '货主', index: 'shipperAppUserName', width: '120px', className: 'text-center' },
|
||||
{ title: '关联运单号', index: 'wayBillCode', width: '120px', className: 'text-center' },
|
||||
{ title: '货源编号', index: 'resourceCode', width: '120px', className: 'text-center' },
|
||||
{ title: '装货地', index: 'loadingPlace', width: '120px', className: 'text-center' },
|
||||
{ title: '装货地', index: 'loadingAddressArr', width: '120px', className: 'text-center' },
|
||||
{
|
||||
title: '卸货地',
|
||||
className: 'text-center',
|
||||
width: '120px',
|
||||
index: 'dischargePlace'
|
||||
index: 'unloadingAddressArr'
|
||||
},
|
||||
{
|
||||
title: '货物信息',
|
||||
className: 'text-center',
|
||||
width: '120px',
|
||||
render: 'goodsName'
|
||||
}, {
|
||||
title: '承运司机',
|
||||
className: 'text-center',
|
||||
width: '120px',
|
||||
index: 'driverId'
|
||||
render: 'driverName'
|
||||
},
|
||||
{
|
||||
title: '收款人',
|
||||
className: 'text-center',
|
||||
index: 'payeeId',
|
||||
render: 'payeeName',
|
||||
width: '100px',
|
||||
},
|
||||
{
|
||||
@ -366,7 +379,7 @@ export class OrderManagementVehicleComponent implements OnInit {
|
||||
},
|
||||
{
|
||||
text: '运费变更记录',
|
||||
click: (_record) => this.OpenPrice(),
|
||||
click: (_record) => this.OpenPrice(_record),
|
||||
},
|
||||
{
|
||||
text: '变更运费',
|
||||
@ -397,19 +410,19 @@ export class OrderManagementVehicleComponent implements OnInit {
|
||||
{
|
||||
title: '序号',
|
||||
className: 'text-center',
|
||||
index: 'one',
|
||||
render: 'order'
|
||||
},
|
||||
{
|
||||
title: '操作时间',
|
||||
className: 'text-center',
|
||||
index: 'two',
|
||||
index: 'applyTime'
|
||||
},
|
||||
{
|
||||
title: '操作人',
|
||||
className: 'text-center',
|
||||
index: 'three',
|
||||
index: 'applyUserName'
|
||||
},
|
||||
{ title: '状态', index: 'externalSn', className: 'text-center' },
|
||||
{ title: '状态', index: 'handleStatus', className: 'text-center' },
|
||||
{
|
||||
title: '操作',
|
||||
fixed: 'right',
|
||||
@ -419,9 +432,13 @@ export class OrderManagementVehicleComponent implements OnInit {
|
||||
text: '查看',
|
||||
click: (_record) => this.FloatView(_record),
|
||||
},
|
||||
// {
|
||||
// text: '查看协议',
|
||||
// click: (_record, _modal, _instance) => this.view(_record)
|
||||
// },
|
||||
{
|
||||
text: '撤销',
|
||||
click: (_record) => this.audit(_record),
|
||||
click: (_record) => this.revoke(_record),
|
||||
},
|
||||
],
|
||||
},
|
||||
@ -520,7 +537,9 @@ export class OrderManagementVehicleComponent implements OnInit {
|
||||
handleOK() {
|
||||
|
||||
}
|
||||
OpenPrice() {
|
||||
OpenPrice(value: any) {
|
||||
console.log(value)
|
||||
this.changeId = value.id;
|
||||
this.isVisible = true
|
||||
}
|
||||
/**
|
||||
@ -528,6 +547,8 @@ export class OrderManagementVehicleComponent implements OnInit {
|
||||
*/
|
||||
FloatView(item: any) {
|
||||
console.log(item)
|
||||
console.log()
|
||||
this.changeViewId = item.id;
|
||||
this.isVisibleView = true
|
||||
}
|
||||
/**
|
||||
@ -573,7 +594,8 @@ export class OrderManagementVehicleComponent implements OnInit {
|
||||
nzWidth: '50%',
|
||||
nzContent: VehicleSureDepartComponent,
|
||||
nzComponentParams: {
|
||||
i: item
|
||||
i: item,
|
||||
Status: 2
|
||||
},
|
||||
nzFooter: null
|
||||
});
|
||||
@ -590,4 +612,19 @@ export class OrderManagementVehicleComponent implements OnInit {
|
||||
nzFooter: null
|
||||
});
|
||||
}
|
||||
revoke(item: any) {
|
||||
this.modal.confirm({
|
||||
nzTitle: '是否确定立即撤销费用变更!</i>',
|
||||
nzOnOk: () =>
|
||||
this.service.request(this.service.$api_get_revokeChangeRecord, { id: item.id}).subscribe((res) => {
|
||||
console.log(res)
|
||||
if(res) {
|
||||
this.service.msgSrv.success('撤销成功!')
|
||||
this.stFloat.reload()
|
||||
} else {
|
||||
this.service.msgSrv.error(res.msg)
|
||||
}
|
||||
})
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@ -2,7 +2,7 @@ import { preloaderFinished } from '@delon/theme';
|
||||
/*
|
||||
* @Author: your name
|
||||
* @Date: 2021-12-14 14:03:07
|
||||
* @LastEditTime: 2021-12-14 16:34:52
|
||||
* @LastEditTime: 2021-12-20 16:13:16
|
||||
* @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
|
||||
@ -34,6 +34,8 @@ import { Observable, Observer } from 'rxjs';
|
||||
export class SureDepartComponent implements OnInit {
|
||||
record: any = {};
|
||||
i: any;
|
||||
Status: any;
|
||||
|
||||
data: any ={
|
||||
place1: '',
|
||||
place2: ''
|
||||
|
||||
@ -2,7 +2,7 @@ import { preloaderFinished } from '@delon/theme';
|
||||
/*
|
||||
* @Author: your name
|
||||
* @Date: 2021-12-14 14:03:07
|
||||
* @LastEditTime: 2021-12-14 17:38:20
|
||||
* @LastEditTime: 2021-12-20 16:21:19
|
||||
* @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
|
||||
@ -34,6 +34,7 @@ import { Observable, Observer } from 'rxjs';
|
||||
export class VehicleSureArriveComponent implements OnInit {
|
||||
record: any = {};
|
||||
i: any;
|
||||
Status: any;
|
||||
data: any ={
|
||||
place1: '',
|
||||
place2: ''
|
||||
|
||||
@ -1,21 +1,21 @@
|
||||
<!--
|
||||
* @Author: your name
|
||||
* @Date: 2021-12-14 15:53:03
|
||||
* @LastEditTime: 2021-12-14 16:19:03
|
||||
* @LastEditTime: 2021-12-20 16:28:39
|
||||
* @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\sure-depart\sure-depart.component.html
|
||||
-->
|
||||
<sf #sf mode="edit" [schema]="schema" [ui]="ui" [formData]="i" button="none">
|
||||
<ng-template sf-template="no2" let-me let-ui="ui" let-schema="schema">
|
||||
<ng-template sf-template="weight" 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>
|
||||
<nz-input-number [(ngModel)]="data.weight" [nzMin]="1" [nzMax]="999999" [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">
|
||||
<ng-template sf-template="volume" 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>
|
||||
<nz-input-number [(ngModel)]="data.volume" [nzMin]="1" [nzMax]="999999" [nzStep]="1"></nz-input-number>
|
||||
<div class="left_btn">方</div>
|
||||
</div>
|
||||
</ng-template>
|
||||
|
||||
@ -2,7 +2,7 @@ import { preloaderFinished } from '@delon/theme';
|
||||
/*
|
||||
* @Author: your name
|
||||
* @Date: 2021-12-14 14:03:07
|
||||
* @LastEditTime: 2021-12-14 16:34:52
|
||||
* @LastEditTime: 2021-12-20 16:54:21
|
||||
* @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
|
||||
@ -20,11 +20,13 @@ import {
|
||||
SFUISchema,
|
||||
SFUploadWidgetSchema
|
||||
} from '@delon/form';
|
||||
import { apiConf } from '@conf/api.conf';
|
||||
import { _HttpClient } from '@delon/theme';
|
||||
import { NzMessageService } from 'ng-zorro-antd/message';
|
||||
import { NzModalRef } from 'ng-zorro-antd/modal';
|
||||
import { SupplyManagementService } from 'src/app/routes/supply-management/services/supply-management.service';
|
||||
import { Observable, Observer } from 'rxjs';
|
||||
import { WaybillManagementServe } from 'src/app/routes/waybill-management/services/waybill-management.service';
|
||||
import { EAEnvironmentService, EADateUtil } from '@shared';
|
||||
|
||||
@Component({
|
||||
selector: 'app-order-management-vehicle-sure-depart',
|
||||
@ -34,162 +36,257 @@ import { Observable, Observer } from 'rxjs';
|
||||
export class VehicleSureDepartComponent implements OnInit {
|
||||
record: any = {};
|
||||
i: any;
|
||||
Status: any;
|
||||
data: any ={
|
||||
place1: '',
|
||||
place2: ''
|
||||
weight: '',
|
||||
volume: ''
|
||||
};
|
||||
@ViewChild('sf', { static: false }) sf!: SFComponent;
|
||||
schema: SFSchema = {};
|
||||
ui: SFUISchema = {};
|
||||
constructor(private modal: NzModalRef, private msgSrv: NzMessageService, public http: _HttpClient, public service: SupplyManagementService ) {}
|
||||
constructor(private modal: NzModalRef, private msgSrv: NzMessageService, public http: _HttpClient, public service: WaybillManagementServe, private envSrv: EAEnvironmentService,) {}
|
||||
|
||||
ngOnInit(): void {
|
||||
this.initSF();
|
||||
console.log(this.i)
|
||||
this.data.weight = this.i?.weight
|
||||
this.i.time = this.i.loadingTime;
|
||||
console.log(this.Status)
|
||||
}
|
||||
initSF() {
|
||||
this.schema = {
|
||||
properties: {
|
||||
datetime: {
|
||||
type: 'string',
|
||||
title: '装货时间',
|
||||
format: 'date-time',
|
||||
},
|
||||
no2: {
|
||||
type: 'string',
|
||||
title: '装货重量',
|
||||
ui: {
|
||||
widget: 'custom',
|
||||
}
|
||||
},
|
||||
no3: {
|
||||
type: 'string',
|
||||
title: '装货体积',
|
||||
ui: {
|
||||
widget: 'custom',
|
||||
}
|
||||
},
|
||||
no4: {
|
||||
type: 'string',
|
||||
title: '',
|
||||
ui: {
|
||||
widget: 'text',
|
||||
},
|
||||
default: '单张大小不超过5M,支持.jpg、.jpeg和 .png格式',
|
||||
},
|
||||
avatar: {
|
||||
type: 'string',
|
||||
title: '装货凭证',
|
||||
ui: {
|
||||
action: `/scm/cms/cms/upload/multipartFile/fileModel`,
|
||||
fileType: 'image/png,image/jpeg,image/jpg',
|
||||
limit: 1,
|
||||
limitFileCount: 1,
|
||||
resReName: 'url',
|
||||
urlReName: 'url',
|
||||
widget: 'upload',
|
||||
descriptionI18n: ' 提单号',
|
||||
data: {
|
||||
// appId: environment.appId,
|
||||
},
|
||||
name: 'multipartFile',
|
||||
multiple: true,
|
||||
listType: 'picture-card',
|
||||
change: (args: any) => {
|
||||
if (args.type === 'success') {
|
||||
const avatar = [
|
||||
{
|
||||
uid: -1,
|
||||
name: 'LOGO',
|
||||
status: 'done',
|
||||
url: args.fileList[0].response.url,
|
||||
response: {
|
||||
url: args.fileList[0].response.url
|
||||
}
|
||||
if(this.Status === 1) {
|
||||
this.schema = {
|
||||
properties: {
|
||||
datetime: {
|
||||
type: 'string',
|
||||
title: '装货时间',
|
||||
format: 'date-time',
|
||||
},
|
||||
imgUrl1: {
|
||||
type: 'string',
|
||||
title: '装货凭证',
|
||||
ui: {
|
||||
widget: 'upload',
|
||||
action: apiConf.fileUpload,
|
||||
fileType: 'image/png,image/jpeg,image/jpg,image/gif',
|
||||
limit: 1,
|
||||
limitFileCount: 1,
|
||||
resReName: 'data.fullFileWatermarkPath',
|
||||
urlReName: 'data.fullFileWatermarkPath',
|
||||
descriptionI18n: '提货单',
|
||||
data: {
|
||||
appId: this.envSrv.env.appId,
|
||||
},
|
||||
name: 'multipartFile',
|
||||
beforeUpload: (file: any, fileList: any) => {
|
||||
return new Observable((observer: Observer<boolean>) => {
|
||||
const isLt1M = file.size / 1024 / 1024 < 5;
|
||||
const fileType = 'image/png,image/jpeg';
|
||||
if (fileType.indexOf(file.type) === -1) {
|
||||
this.service.msgSrv.warning('图片格式不正确!');
|
||||
observer.complete();
|
||||
return;
|
||||
}
|
||||
];
|
||||
this.sf?.setValue('/avatar', avatar);
|
||||
}
|
||||
},
|
||||
beforeUpload: (file: any, _fileList: any) => {
|
||||
return new Observable((observer: Observer<boolean>) => {
|
||||
const isLt2M = file.size / 1024 / 1024 < 5;
|
||||
if (!isLt2M) {
|
||||
this.service.msgSrv.warning('图片大小超过5M!');
|
||||
observer.complete();
|
||||
return;
|
||||
}
|
||||
observer.next(isLt2M);
|
||||
observer.complete();
|
||||
});
|
||||
}
|
||||
} as SFUploadWidgetSchema
|
||||
},
|
||||
avatar2: {
|
||||
type: 'string',
|
||||
title: '',
|
||||
ui: {
|
||||
action: `/scm/cms/cms/upload/multipartFile/fileModel`,
|
||||
fileType: 'image/png,image/jpeg,image/jpg',
|
||||
limit: 1,
|
||||
limitFileCount: 1,
|
||||
resReName: 'url',
|
||||
urlReName: 'url',
|
||||
widget: 'upload',
|
||||
descriptionI18n: '人车货照片',
|
||||
data: {
|
||||
// appId: environment.appId,
|
||||
},
|
||||
name: 'multipartFile',
|
||||
multiple: true,
|
||||
listType: 'picture-card',
|
||||
change: (args: any) => {
|
||||
if (args.type === 'success') {
|
||||
const avatar = [
|
||||
{
|
||||
uid: -1,
|
||||
name: 'LOGO',
|
||||
status: 'done',
|
||||
url: args.fileList[0].response.url,
|
||||
response: {
|
||||
url: args.fileList[0].response.url
|
||||
}
|
||||
if (!isLt1M) {
|
||||
this.service.msgSrv.warning('图片大小超过5M!');
|
||||
observer.complete();
|
||||
return;
|
||||
}
|
||||
];
|
||||
this.sf?.setValue('/avatar', avatar);
|
||||
}
|
||||
},
|
||||
beforeUpload: (file: any, _fileList: any) => {
|
||||
return new Observable((observer: Observer<boolean>) => {
|
||||
const isLt2M = file.size / 1024 / 1024 < 5;
|
||||
if (!isLt2M) {
|
||||
this.service.msgSrv.warning('图片大小超过5M!');
|
||||
observer.next(isLt1M);
|
||||
observer.complete();
|
||||
return;
|
||||
}
|
||||
observer.next(isLt2M);
|
||||
observer.complete();
|
||||
});
|
||||
}
|
||||
} as SFUploadWidgetSchema
|
||||
}
|
||||
},
|
||||
required: ['reason']
|
||||
};
|
||||
});
|
||||
},
|
||||
multiple: false,
|
||||
listType: 'picture-card',
|
||||
showRequired: true,
|
||||
} as SFUploadWidgetSchema,
|
||||
},
|
||||
imgUrl2: {
|
||||
type: 'string',
|
||||
title: '',
|
||||
ui: {
|
||||
widget: 'upload',
|
||||
action: apiConf.fileUpload,
|
||||
fileType: 'image/png,image/jpeg,image/jpg,image/gif',
|
||||
limit: 1,
|
||||
limitFileCount: 1,
|
||||
resReName: 'data.fullFileWatermarkPath',
|
||||
urlReName: 'data.fullFileWatermarkPath',
|
||||
descriptionI18n: '人车货照片',
|
||||
data: {
|
||||
appId: this.envSrv.env.appId,
|
||||
},
|
||||
name: 'multipartFile',
|
||||
beforeUpload: (file: any, fileList: any) => {
|
||||
return new Observable((observer: Observer<boolean>) => {
|
||||
const isLt1M = file.size / 1024 / 1024 < 5;
|
||||
const fileType = 'image/png,image/jpeg';
|
||||
if (fileType.indexOf(file.type) === -1) {
|
||||
this.service.msgSrv.warning('图片格式不正确!');
|
||||
observer.complete();
|
||||
return;
|
||||
}
|
||||
if (!isLt1M) {
|
||||
this.service.msgSrv.warning('图片大小超过5M!');
|
||||
observer.complete();
|
||||
return;
|
||||
}
|
||||
observer.next(isLt1M);
|
||||
observer.complete();
|
||||
});
|
||||
},
|
||||
multiple: false,
|
||||
listType: 'picture-card',
|
||||
showRequired: true,
|
||||
} as SFUploadWidgetSchema,
|
||||
}
|
||||
},
|
||||
required: ['reason']
|
||||
};
|
||||
} else {
|
||||
this.schema = {
|
||||
properties: {
|
||||
time: {
|
||||
type: 'string',
|
||||
title: '装货时间',
|
||||
format: 'date-time',
|
||||
},
|
||||
weight: {
|
||||
type: 'string',
|
||||
title: '装货重量',
|
||||
ui: {
|
||||
widget: 'custom',
|
||||
}
|
||||
},
|
||||
volume: {
|
||||
type: 'string',
|
||||
title: '装货体积',
|
||||
ui: {
|
||||
widget: 'custom',
|
||||
}
|
||||
},
|
||||
no4: {
|
||||
type: 'string',
|
||||
title: '',
|
||||
ui: {
|
||||
widget: 'text',
|
||||
},
|
||||
default: '单张大小不超过5M,支持.jpg、.jpeg和 .png格式',
|
||||
},
|
||||
imgUrl1: {
|
||||
type: 'string',
|
||||
title: '装货凭证',
|
||||
ui: {
|
||||
widget: 'upload',
|
||||
action: apiConf.fileUpload,
|
||||
fileType: 'image/png,image/jpeg,image/jpg,image/gif',
|
||||
limit: 1,
|
||||
limitFileCount: 1,
|
||||
resReName: 'data.fullFileWatermarkPath',
|
||||
urlReName: 'data.fullFileWatermarkPath',
|
||||
descriptionI18n: '提货单',
|
||||
data: {
|
||||
appId: this.envSrv.env.appId,
|
||||
},
|
||||
name: 'multipartFile',
|
||||
beforeUpload: (file: any, fileList: any) => {
|
||||
return new Observable((observer: Observer<boolean>) => {
|
||||
const isLt1M = file.size / 1024 / 1024 < 5;
|
||||
const fileType = 'image/png,image/jpeg';
|
||||
if (fileType.indexOf(file.type) === -1) {
|
||||
this.service.msgSrv.warning('图片格式不正确!');
|
||||
observer.complete();
|
||||
return;
|
||||
}
|
||||
if (!isLt1M) {
|
||||
this.service.msgSrv.warning('图片大小超过5M!');
|
||||
observer.complete();
|
||||
return;
|
||||
}
|
||||
observer.next(isLt1M);
|
||||
observer.complete();
|
||||
});
|
||||
},
|
||||
multiple: false,
|
||||
listType: 'picture-card',
|
||||
showRequired: true,
|
||||
} as SFUploadWidgetSchema,
|
||||
},
|
||||
imgUrl2: {
|
||||
type: 'string',
|
||||
title: '',
|
||||
ui: {
|
||||
widget: 'upload',
|
||||
action: apiConf.fileUpload,
|
||||
fileType: 'image/png,image/jpeg,image/jpg,image/gif',
|
||||
limit: 1,
|
||||
limitFileCount: 1,
|
||||
resReName: 'data.fullFileWatermarkPath',
|
||||
urlReName: 'data.fullFileWatermarkPath',
|
||||
descriptionI18n: '人车货照片',
|
||||
data: {
|
||||
appId: this.envSrv.env.appId,
|
||||
},
|
||||
name: 'multipartFile',
|
||||
beforeUpload: (file: any, fileList: any) => {
|
||||
return new Observable((observer: Observer<boolean>) => {
|
||||
const isLt1M = file.size / 1024 / 1024 < 5;
|
||||
const fileType = 'image/png,image/jpeg';
|
||||
if (fileType.indexOf(file.type) === -1) {
|
||||
this.service.msgSrv.warning('图片格式不正确!');
|
||||
observer.complete();
|
||||
return;
|
||||
}
|
||||
if (!isLt1M) {
|
||||
this.service.msgSrv.warning('图片大小超过5M!');
|
||||
observer.complete();
|
||||
return;
|
||||
}
|
||||
observer.next(isLt1M);
|
||||
observer.complete();
|
||||
});
|
||||
},
|
||||
multiple: false,
|
||||
listType: 'picture-card',
|
||||
showRequired: true,
|
||||
} as SFUploadWidgetSchema,
|
||||
}
|
||||
},
|
||||
required: ['reason']
|
||||
};
|
||||
}
|
||||
|
||||
this.ui = {
|
||||
'*': {
|
||||
spanLabelFixed: 100,
|
||||
grid: { span: 20 }
|
||||
},
|
||||
$avatar: { grid: { span: 12} },
|
||||
$avatar2: { grid: { span: 12} },
|
||||
$imgUrl1: { grid: { span: 12} },
|
||||
$imgUrl2: { grid: { span: 12} },
|
||||
};
|
||||
}
|
||||
save(value: any): void {
|
||||
|
||||
console.log(value)
|
||||
// this.http.post(`/user/${this.record.id}`, value).subscribe(res => {
|
||||
// this.msgSrv.success('保存成功');
|
||||
// this.modal.close(true);
|
||||
// });
|
||||
const params = {
|
||||
id: this.i.id,
|
||||
imgUrl1: value.imgUrl1.data.fullFilePath,
|
||||
imgUrl2: value.imgUrl2.data.fullFilePath,
|
||||
time: value.time,
|
||||
volume: this.data.volume,
|
||||
weight: this.data.weight
|
||||
}
|
||||
console.log(EADateUtil.yearToDateTime(value.time))
|
||||
params.time = EADateUtil.yearToDateTime(value.time)
|
||||
console.log(params)
|
||||
|
||||
// this.service.request(this.service.$api_get_insertBulkStartCarInfo, params).subscribe((res) => {
|
||||
// if(res) {
|
||||
// this.service.msgSrv.success('确认发车成功!')
|
||||
// } else{
|
||||
// this.service.msgSrv.error(res.msg)
|
||||
// }
|
||||
// })
|
||||
}
|
||||
|
||||
close(): void {
|
||||
|
||||
@ -1,22 +1,27 @@
|
||||
<!--
|
||||
* @Author: your name
|
||||
* @Date: 2021-12-14 14:03:07
|
||||
* @LastEditTime: 2021-12-15 15:53:02
|
||||
* @LastEditors: Please set LastEditors
|
||||
* @Date: 2021-12-15 13:17:42
|
||||
* @LastEditTime: 2021-12-20 15:55:51
|
||||
* @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
|
||||
* @FilePath: \tms-obc-web\src\app\routes\order-management\modal\vehicle\update-freight\update-freight.component.html
|
||||
-->
|
||||
<sf #sf [schema]="schema" [ui]="ui" [compact]="true" [button]="'none'">
|
||||
</sf>
|
||||
<nz-spin *ngIf="!i" class="modal-spin"></nz-spin>
|
||||
<sf #sf mode="edit" [schema]="schema" [ui]="ui" [formData]="i" button="none"></sf>
|
||||
<nz-divider></nz-divider>
|
||||
<div>
|
||||
<p style="font-weight: bolder;">总运费:<span style="color: red;">¥{{gross}}</span></p>
|
||||
<p>运输费:¥{{transportation}},附加费:¥{{additional}}</p>
|
||||
<p>
|
||||
<span style="font-weight: bolder"
|
||||
>总运费:<span style="color: #dc112a">¥{{ totalPrice }}</span></span
|
||||
>
|
||||
(运输费:¥{{ tranPrice }},附加费:¥{{ otherPrice }})
|
||||
</p>
|
||||
<p>
|
||||
<label nz-checkbox [(ngModel)]="aggreechecked">确认已阅读并知晓<a>《变更协议》</a></label>
|
||||
</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
|
||||
>
|
||||
<button nz-button type="submit" nzType="primary" (click)="save(sf.value)" [disabled]="!aggreechecked">确定</button>
|
||||
</div>
|
||||
|
||||
@ -2,7 +2,7 @@ import { preloaderFinished } from '@delon/theme';
|
||||
/*
|
||||
* @Author: your name
|
||||
* @Date: 2021-12-14 14:03:07
|
||||
* @LastEditTime: 2021-12-15 15:52:36
|
||||
* @LastEditTime: 2021-12-20 15:57:37
|
||||
* @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
|
||||
@ -21,6 +21,7 @@ import {
|
||||
import { _HttpClient } from '@delon/theme';
|
||||
import { NzMessageService } from 'ng-zorro-antd/message';
|
||||
import { NzModalRef } from 'ng-zorro-antd/modal';
|
||||
import { OrderManagementService } from '../../../services/order-management.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-order-management-vehicle-update-freight',
|
||||
@ -28,68 +29,140 @@ import { NzModalRef } from 'ng-zorro-antd/modal';
|
||||
styleUrls: ['./update-freight.component.less']
|
||||
})
|
||||
export class VehicleUpdateFreightComponent implements OnInit {
|
||||
record: any = {};
|
||||
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) {}
|
||||
|
||||
totalPrice = 0;
|
||||
tranPrice = 0;
|
||||
otherPrice = 0;
|
||||
|
||||
aggreechecked = false;
|
||||
constructor(private modal: NzModalRef, private msgSrv: NzMessageService, public service: OrderManagementService) {}
|
||||
|
||||
ngOnInit(): void {
|
||||
this.i = {
|
||||
prePay: this.record?.mybidDetailInfo?.filter((data: any) => data.expenseCode === 'PRE')[0]?.price || 0,
|
||||
toPay: this.record?.mybidDetailInfo?.filter((data: any) => data.expenseCode === 'RECE')[0]?.price || 0,
|
||||
oilCardPay: this.record?.mybidDetailInfo?.filter((data: any) => data.expenseCode === 'OIL')[0]?.price || 0,
|
||||
receiptPay: this.record?.mybidDetailInfo?.filter((data: any) => data.expenseCode === 'BACK')[0]?.price || 0,
|
||||
prePayStatus: this.record?.mybidDetailInfo?.filter((data: any) => data.expenseCode === 'PRE')[0]?.paymentStatus,
|
||||
toPayStatus: this.record?.mybidDetailInfo?.filter((data: any) => data.expenseCode === 'RECE')[0]?.paymentStatus,
|
||||
oilCardPayStatus: this.record?.mybidDetailInfo?.filter((data: any) => data.expenseCode === 'OIL')[0]?.paymentStatus,
|
||||
receiptPayStatus: this.record?.mybidDetailInfo?.filter((data: any) => data.expenseCode === 'BACK')[0]?.paymentStatus
|
||||
};
|
||||
this.tranPrice = this.i.prePay + this.i.toPay + this.i.oilCardPay + this.i.receiptPay;
|
||||
this.totalPrice = this.i.prePay + this.i.toPay + this.i.oilCardPay + this.i.receiptPay + this.otherPrice;
|
||||
this.initSF();
|
||||
|
||||
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
|
||||
this.service.request(this.service.$api_get_getFreightChangeWholeDetail, { id: this.record.id}).subscribe((res) => {
|
||||
console.log(res)
|
||||
console.log(this.i)
|
||||
console.log(this.tranPrice)
|
||||
})
|
||||
}
|
||||
initSF() {
|
||||
this.schema= {
|
||||
this.schema = {
|
||||
properties: {
|
||||
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: {
|
||||
prePay: {
|
||||
type: 'number',
|
||||
title: '预付',
|
||||
default: 0.0,
|
||||
readOnly: this.i.prePayStatus !== '3',
|
||||
ui: {
|
||||
prefix: '¥',
|
||||
widgetWidth: 200,
|
||||
precision: 2,
|
||||
change: (val: any) => this.changeNumVal()
|
||||
} as SFNumberWidgetSchema
|
||||
},
|
||||
toPay: {
|
||||
type: 'number',
|
||||
title: '到付',
|
||||
default: 0.0,
|
||||
readOnly: this.i.toPayStatus !== '3',
|
||||
ui: {
|
||||
prefix: '¥',
|
||||
widgetWidth: 200,
|
||||
precision: 2,
|
||||
change: (val: any) => this.changeNumVal()
|
||||
} as SFNumberWidgetSchema
|
||||
},
|
||||
// oilCardPay: {
|
||||
// type: 'number',
|
||||
// title: '油卡',
|
||||
// default: 0.0,
|
||||
// readOnly: this.i.oilCardPayStatus === '1' || this.i.oilCardPayStatus === '3',
|
||||
// ui: {
|
||||
// prefix: '¥',
|
||||
// widgetWidth: 200,
|
||||
// precision: 2,
|
||||
// change: (val: any) => this.changeNumVal()
|
||||
// } as SFNumberWidgetSchema
|
||||
// },
|
||||
receiptPay: {
|
||||
type: 'number',
|
||||
title: '回单付',
|
||||
default: 0.0,
|
||||
readOnly: this.i.receiptPayStatus !== '3',
|
||||
ui: {
|
||||
prefix: '¥',
|
||||
widgetWidth: 200,
|
||||
precision: 2,
|
||||
change: (val: any) => this.changeNumVal()
|
||||
} as SFNumberWidgetSchema
|
||||
},
|
||||
changeCause: {
|
||||
type: 'string',
|
||||
title: '变更原因',
|
||||
maxLength: 100,
|
||||
ui: {
|
||||
widgetWidth: 300,
|
||||
placeholder:"选填,最多不超过100字",
|
||||
widget: 'textarea',
|
||||
autosize: { minRows: 3, maxRows: 6 }
|
||||
} as SFTextareaWidgetSchema
|
||||
},
|
||||
}
|
||||
},
|
||||
required: ['name3'],
|
||||
type: 'object',
|
||||
required: ['changeCause']
|
||||
};
|
||||
this.ui = { '*': { spanLabelFixed: 100, grid: { span: 16,gutter:8 } }
|
||||
this.ui = {
|
||||
'*': {
|
||||
spanLabelFixed: 100,
|
||||
grid: { span: 16 }
|
||||
}
|
||||
};
|
||||
}
|
||||
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 => {
|
||||
this.msgSrv.success('保存成功');
|
||||
this.modal.close(true);
|
||||
const editItems = this.record?.mybidDetailInfo.filter((data: any) => data.receiptPayStatus === '3');
|
||||
editItems.forEach((item: any) => {
|
||||
switch (item.expenseName) {
|
||||
case '预付':
|
||||
item.price = this.sf.value.prePay;
|
||||
break;
|
||||
case '到付':
|
||||
item.price = this.sf.value.toPay;
|
||||
break;
|
||||
case '回单付':
|
||||
item.price = this.sf.value.receiptPay;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
});
|
||||
|
||||
const params = {
|
||||
id: this.record?.id,
|
||||
dtos: editItems,
|
||||
changeCause: this.sf.value.changeCause
|
||||
};
|
||||
|
||||
// this.service.request(this.service.$api_insertFreightChangeWhole, params).subscribe((res: any) => {
|
||||
// if (res) {
|
||||
// this.modal.destroy();
|
||||
// } else {
|
||||
// this.service.msgSrv.error(res.msg);
|
||||
// }
|
||||
// });
|
||||
}
|
||||
|
||||
close(): void {
|
||||
@ -97,8 +170,10 @@ export class VehicleUpdateFreightComponent implements OnInit {
|
||||
}
|
||||
/**
|
||||
* 更新数字框
|
||||
* @param value
|
||||
* @param type
|
||||
*
|
||||
*/
|
||||
changeNumVal(value: any, type: number) {}
|
||||
changeNumVal() {
|
||||
this.tranPrice = this.sf.value.prePay + this.sf.value.toPay + this.sf.value.oilCardPay + this.sf.value.receiptPay;
|
||||
this.totalPrice = this.sf.value.prePay + this.sf.value.toPay + this.sf.value.oilCardPay + this.sf.value.receiptPay + this.otherPrice;
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/*
|
||||
* @Author: your name
|
||||
* @Date: 2021-12-03 15:31:52
|
||||
* @LastEditTime: 2021-12-20 10:00:25
|
||||
* @LastEditTime: 2021-12-20 15:30: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\services\order-management.service.ts
|
||||
@ -33,7 +33,18 @@ export class OrderManagementService extends BaseService {
|
||||
// 整车详情
|
||||
$api_get_getWholeBillDetail = `/api/sdc/billOperate/getWholeBillDetail`;
|
||||
// 根据车牌号查询车辆信息
|
||||
$api_get_getCarLicenseListByCarNo= `/api/mdc/cuc/carLicenseAudit/operate/getCarLicenseListByCarNo`;
|
||||
$api_get_getCarLicenseListByCarNo= `/api/mdc/cuc/carLicenseAudit/operate/getCarLicenseListByCarNo`;
|
||||
|
||||
// 查询大宗订单列表
|
||||
$api_get_listBulkPage = `/api/sdc/billOperate/listBulkPage`;
|
||||
// 查看运费变更记录详情-整车
|
||||
$api_get_getChangeRecordWholeDetail = `/api/sdc/billFreightChangeRecord/getChangeRecordWholeDetail`;
|
||||
// 根据订单ID查看运费变更申请记录
|
||||
$api_get_listChangeApply = `/api/sdc/billFreightChangeApplication/listChangeApply`;
|
||||
// 变更运费页面-整车-整车
|
||||
$api_get_getFreightChangeWholeDetail = `/api/sdc/billFreightChangeApplication/getFreightChangeWholeDetail`;
|
||||
// 订单申请撤销
|
||||
$api_get_revokeChangeRecord = `/api/sdc/billFreightChangeApplication/revokeChangeRecord`;
|
||||
constructor(public injector: Injector) {
|
||||
super(injector)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user