车辆对接

This commit is contained in:
wangshiming
2022-01-13 13:53:47 +08:00
parent b8a8526d54
commit 948165710b
16 changed files with 207 additions and 138 deletions

View File

@ -1,7 +1,7 @@
/* /*
* @Author: your name * @Author: your name
* @Date: 2021-12-07 19:42:53 * @Date: 2021-12-07 19:42:53
* @LastEditTime: 2022-01-13 10:20:45 * @LastEditTime: 2022-01-13 11:05:48
* @LastEditors: Please set LastEditors * @LastEditors: Please set LastEditors
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
* @FilePath: \tms-obc-web\proxy.conf.js * @FilePath: \tms-obc-web\proxy.conf.js
@ -24,7 +24,7 @@ module.exports = {
// } // }
'//api': { '//api': {
target: { target: {
host: 'tms-api-dev.eascs.com', host: 'tms-api-test.eascs.com',
protocol: 'https:', protocol: 'https:',
port: 443 port: 443
}, },

View File

@ -1,7 +1,7 @@
<!-- <!--
* @Author: your name * @Author: your name
* @Date: 2021-12-03 11:10:14 * @Date: 2021-12-03 11:10:14
* @LastEditTime: 2022-01-13 10:01:50 * @LastEditTime: 2022-01-13 13:30:01
* @LastEditors: Please set LastEditors * @LastEditors: Please set LastEditors
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE * @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 * @FilePath: \tms-obc-web\src\app\routes\supply-management\components\vehicle\vehicle.component.html
@ -24,7 +24,7 @@
</div> </div>
<div nz-col [nzSpan]="_$expand ? 24 : 6" [class.text-right]="_$expand"> <div nz-col [nzSpan]="_$expand ? 24 : 6" [class.text-right]="_$expand">
<button nz-button nzType="primary" [nzLoading]="service.http.loading" <button nz-button nzType="primary" [nzLoading]="service.http.loading"
(click)="st?.load(1)">查询</button> (click)="search()">查询</button>
<button nz-button nzType="primary" [disabled]="service.http.loading" <button nz-button nzType="primary" [disabled]="service.http.loading"
>导出</button> >导出</button>
<button nz-button [disabled]="service.http.loading" (click)="resetSF()">重置</button> <button nz-button [disabled]="service.http.loading" (click)="resetSF()">重置</button>
@ -40,7 +40,7 @@
<nz-card> <nz-card>
<nz-tabset (nzSelectedIndexChange)="selectChange($event)" <nz-tabset (nzSelectedIndexChange)="selectChange($event)"
[nzTabBarExtraContent]="extraTemplate"> [nzTabBarExtraContent]="extraTemplate">
<nz-tab [nzTitle]="'全部'"></nz-tab> <nz-tab [nzTitle]="'全部('+tabs?.totalCount+')'"></nz-tab>
<nz-tab [nzTitle]="'待接单('+tabs?.receivedQuantity+')'"></nz-tab> <nz-tab [nzTitle]="'待接单('+tabs?.receivedQuantity+')'"></nz-tab>
<nz-tab [nzTitle]="'待发车('+tabs?.stayQuantity+')'"></nz-tab> <nz-tab [nzTitle]="'待发车('+tabs?.stayQuantity+')'"></nz-tab>
<nz-tab [nzTitle]="'运输中('+tabs?.GoingQuantity+')'"></nz-tab> <nz-tab [nzTitle]="'运输中('+tabs?.GoingQuantity+')'"></nz-tab>

View File

@ -1,3 +1,8 @@
:host {
p{
margin-bottom: 0
}
.left_btn { .left_btn {
width: 50px; width: 50px;
height: 32px; height: 32px;
@ -5,3 +10,4 @@
line-height:32px; line-height:32px;
background-color: #d7d7d7; background-color: #d7d7d7;
} }
}

View File

@ -62,7 +62,8 @@ tabs = {
stayQuantity: 0, stayQuantity: 0,
signQuantity: 0, signQuantity: 0,
compolatelQuantity: 0, compolatelQuantity: 0,
GoingQuantity: 0 GoingQuantity: 0,
totalCount: 0
}; };
constructor( constructor(
public service: OrderManagementService, public service: OrderManagementService,
@ -93,9 +94,14 @@ tabs = {
id: this.changeId id: this.changeId
}; };
} }
search() {
this.st?.load(1);
this.getGoodsSourceStatistical()
}
getGoodsSourceStatistical() { getGoodsSourceStatistical() {
this.service.request(this.service.$api_getBulkStatistical).subscribe(res => { this.service.request(this.service.$api_getBulkStatistical).subscribe(res => {
if (res) { if (res) {
let totalCount = 0;
res.forEach((element: any) => { res.forEach((element: any) => {
if(element.billStatusLabel === '待发车') { if(element.billStatusLabel === '待发车') {
this.tabs.stayQuantity = element.quantity this.tabs.stayQuantity = element.quantity
@ -110,7 +116,9 @@ tabs = {
} else if (element.billStatusLabel === '运输中') { } else if (element.billStatusLabel === '运输中') {
this.tabs.GoingQuantity = element.quantity this.tabs.GoingQuantity = element.quantity
} }
totalCount += element.quantity
}); });
this.tabs.totalCount = totalCount
} }
}) })
} }
@ -120,6 +128,8 @@ tabs = {
this.initST(); this.initST();
setTimeout(() => { setTimeout(() => {
this.st.load(); this.st.load();
this.getGoodsSourceStatistical()
}, 500); }, 500);
} }
ngOnInit(): void { ngOnInit(): void {
@ -398,7 +408,7 @@ tabs = {
}, },
{ {
title: '运费明细', title: '运费明细',
width: '200px', width: '250px',
className: 'text-center', className: 'text-center',
render: 'mybidDetailInfo', render: 'mybidDetailInfo',
}, },
@ -517,7 +527,7 @@ tabs = {
className: 'text-center', className: 'text-center',
index: 'applyUserName' index: 'applyUserName'
}, },
{ title: '状态', index: 'handleStatus', className: 'text-center' }, { title: '状态', index: 'handleStatusLabel', className: 'text-center' },
{ {
title: '操作', title: '操作',
fixed: 'right', fixed: 'right',
@ -670,7 +680,12 @@ tabs = {
nzComponentParams: { data: { ...data, billId: item.id } }, nzComponentParams: { data: { ...data, billId: item.id } },
}); });
modal.afterClose.subscribe(_ => this.st.reload(1)); modal.afterClose.subscribe(_ =>
{
this.st.reload(1);
this.getGoodsSourceStatistical();
}
);
} }
}); });
} }
@ -690,6 +705,7 @@ tabs = {
}); });
modalRef.afterClose.subscribe((result: any) => { modalRef.afterClose.subscribe((result: any) => {
this.st.load(1); this.st.load(1);
this.getGoodsSourceStatistical()
}); });
} }
userAction() { userAction() {
@ -702,7 +718,7 @@ tabs = {
this.service.request(this.service.$api_get_batchSignBulkOrder, params).subscribe(res => { this.service.request(this.service.$api_get_batchSignBulkOrder, params).subscribe(res => {
if (res) { if (res) {
this.st.load(1); this.st.load(1);
console.log(res); this.getGoodsSourceStatistical()
} else { } else {
this.service.msgSrv.error(res.msg); this.service.msgSrv.error(res.msg);
} }
@ -719,9 +735,11 @@ tabs = {
if (res === true) { if (res === true) {
this.service.msgSrv.success('操作成功!'); this.service.msgSrv.success('操作成功!');
this.st?.reload(1); this.st?.reload(1);
this.getGoodsSourceStatistical()
this.initST(); this.initST();
} }
this.st?.reload(1); this.st?.reload(1);
this.getGoodsSourceStatistical()
}), }),
}) })
} }
@ -735,6 +753,7 @@ tabs = {
this.service.msgSrv.success('撤销成功!') this.service.msgSrv.success('撤销成功!')
this.stFloat.reload() this.stFloat.reload()
this.st?.reload(1); this.st?.reload(1);
this.getGoodsSourceStatistical()
} else { } else {
this.service.msgSrv.error(res.msg) this.service.msgSrv.error(res.msg)
} }

View File

@ -1,7 +1,7 @@
<!-- <!--
* @Author: your name * @Author: your name
* @Date: 2021-12-03 11:10:14 * @Date: 2021-12-03 11:10:14
* @LastEditTime: 2022-01-13 10:03:16 * @LastEditTime: 2022-01-13 13:45:24
* @LastEditors: Please set LastEditors * @LastEditors: Please set LastEditors
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE * @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 * @FilePath: \tms-obc-web\src\app\routes\supply-management\components\vehicle\vehicle.component.html
@ -24,7 +24,7 @@
</div> </div>
<div nz-col [nzSpan]="_$expand ? 24 : 6" class="text-right"> <div nz-col [nzSpan]="_$expand ? 24 : 6" class="text-right">
<button nz-button nzType="primary" [nzLoading]="service.http.loading" <button nz-button nzType="primary" [nzLoading]="service.http.loading"
(click)="st?.load(1)">查询</button> (click)="search()">查询</button>
<button nz-button nzType="primary" [disabled]="service.http.loading" <button nz-button nzType="primary" [disabled]="service.http.loading"
>导出</button> >导出</button>
<button nz-button [disabled]="service.http.loading" (click)="resetSF()">重置</button> <button nz-button [disabled]="service.http.loading" (click)="resetSF()">重置</button>
@ -40,7 +40,7 @@
<nz-card> <nz-card>
<nz-tabset (nzSelectedIndexChange)="selectChange($event)" <nz-tabset (nzSelectedIndexChange)="selectChange($event)"
[nzTabBarExtraContent]="extraTemplate"> [nzTabBarExtraContent]="extraTemplate">
<nz-tab [nzTitle]="'全部'"></nz-tab> <nz-tab [nzTitle]="'全部('+tabs?.totalCount+')'"></nz-tab>
<nz-tab [nzTitle]="'待接单('+tabs?.receivedQuantity+')'"></nz-tab> <nz-tab [nzTitle]="'待接单('+tabs?.receivedQuantity+')'"></nz-tab>
<nz-tab [nzTitle]="'待发车('+tabs?.stayQuantity+')'"></nz-tab> <nz-tab [nzTitle]="'待发车('+tabs?.stayQuantity+')'"></nz-tab>
<nz-tab [nzTitle]="'运输中('+tabs?.GoingQuantity+')'"></nz-tab> <nz-tab [nzTitle]="'运输中('+tabs?.GoingQuantity+')'"></nz-tab>
@ -52,7 +52,8 @@
<st <st
#st #st
[bordered]="true" [bordered]="true"
[scroll]="{ x: '2000px' }" multiSort
[scroll]="{ x: '1200px' }"
[data]="service.$api_get_listWholePage" [data]="service.$api_get_listWholePage"
[columns]="columns" [columns]="columns"
[req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' }, params: reqParams }" [req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' }, params: reqParams }"
@ -76,15 +77,18 @@
</ng-template> </ng-template>
<!-- 我的出价 --> <!-- 我的出价 -->
<ng-template st-row="mybidInfo" let-item let-index="index" class="temp_p"> <ng-template st-row="mybidInfo" let-item let-index="index" class="temp_p">
<div *ngIf="item.mybidInfo?.length > 0"> <div *ngIf="item.mybidInfo.length > 0">
<p *ngFor="let data of item?.mybidInfo"> {{ data?.expenseName }}:¥{{ data?.price | number:'0.2-2' }} </p> <p *ngFor="let data of item.mybidInfo"> {{ data.expenseName }}:¥{{ data.price | number:'0.2-2' }} </p>
</div> </div>
</ng-template> </ng-template>
<ng-template st-row="mybidDetailInfo" let-item let-index="index"> <ng-template st-row="mybidDetailInfo" let-item let-index="index">
<div *ngIf="item.mybidDetailInfo?.length > 0"> <div *ngIf="item.mybidDetailInfo.length > 0">
<p *ngFor="let data of item.mybidDetailInfo"> <p *ngFor="let data of item.mybidDetailInfo">
{{ data.expenseName }}{{ data.price }} {{ data.expenseName }}{{ data.price | number:'0.2-2' }}
<span style="color: #f59a63">{{ data.paymentStatusLabel }}</span> <span *ngIf="data.paymentStatus && data.paymentStatus === '1'" style="color: #f59a63">待申请</span>
<span *ngIf="data.paymentStatus && data.paymentStatus === '2'" style="color: #f59a63">已拒绝</span>
<span *ngIf="data.paymentStatus && data.paymentStatus === '3'" style="color: #f59a63">已支付</span>
<span *ngIf="data.paymentStatus && data.paymentStatus === '4'" style="color: #f59a63">申请中</span>
</p> </p>
</div> </div>
</ng-template> </ng-template>

View File

@ -1,2 +1,5 @@
:host { :host {
p{
margin-bottom: 0
}
} }

View File

@ -63,7 +63,8 @@ tabs = {
stayQuantity: 0, stayQuantity: 0,
signQuantity: 0, signQuantity: 0,
compolatelQuantity: 0, compolatelQuantity: 0,
GoingQuantity: 0 GoingQuantity: 0,
totalCount: 0
}; };
resourceStatus: any; resourceStatus: any;
constructor( constructor(
@ -106,10 +107,14 @@ resourceStatus: any;
this.initSTFloat(); this.initSTFloat();
this.initSTFloatView(); this.initSTFloatView();
} }
search() {
this.st?.load(1);
this.getGoodsSourceStatistical()
}
getGoodsSourceStatistical() { getGoodsSourceStatistical() {
this.service.request(this.service.$api_statisticalStatus).subscribe(res => { this.service.request(this.service.$api_statisticalStatus).subscribe(res => {
if (res) { if (res) {
let totalCount = 0;
res.forEach((element: any) => { res.forEach((element: any) => {
if(element.billStatusLabel === '待发车') { if(element.billStatusLabel === '待发车') {
this.tabs.stayQuantity = element.quantity this.tabs.stayQuantity = element.quantity
@ -124,7 +129,9 @@ resourceStatus: any;
} else if (element.billStatusLabel === '已取消') { } else if (element.billStatusLabel === '已取消') {
this.tabs.cancelQuantity = element.quantity this.tabs.cancelQuantity = element.quantity
} }
totalCount += element.quantity
}); });
this.tabs.totalCount = totalCount
} }
}) })
} }
@ -347,36 +354,37 @@ resourceStatus: any;
{ title: '', type: 'checkbox', width: '50px', className: 'text-center' }, { title: '', type: 'checkbox', width: '50px', className: 'text-center' },
{ {
title: '订单号', title: '订单号',
width: '100px', width: '200px',
className: 'text-center', className: 'text-center',
render: 'billCode' render: 'billCode'
}, },
{ {
title: '我的出价', title: '我的出价',
width: '150px', width: '200px',
className: 'text-center',
render: 'mybidInfo' render: 'mybidInfo'
}, },
{ {
title: '运费明细', title: '运费明细',
width: '200px', width: '250px',
className: 'text-center', className: 'text-center',
render: 'mybidDetailInfo', render: 'mybidDetailInfo',
}, },
{ title: '网络货运人', index: 'enterpriseInfoName', width: '120px', className: 'text-center' }, { title: '网络货运人', index: 'enterpriseInfoName', width: '170px', className: 'text-center' },
{ title: '货主', index: 'shipperAppUserName', width: '120px', className: 'text-center' }, { title: '货主', index: 'shipperAppUserName', width: '170px', className: 'text-center' },
{ title: '关联运单号', index: 'wayBillCode', width: '120px', className: 'text-center' }, { title: '关联运单号', index: 'wayBillCode', width: '170px', className: 'text-center' },
{ title: '货源编号', index: 'resourceCode', width: '120px', className: 'text-center' }, { title: '货源编号', index: 'resourceCode', width: '170px', className: 'text-center' },
{ title: '装货地', index: 'loadingAddressArr', width: '120px', className: 'text-center' }, { title: '装货地', index: 'loadingAddressArr', width: '170px', className: 'text-center' },
{ {
title: '卸货地', title: '卸货地',
className: 'text-center', className: 'text-center',
width: '120px', width: '170px',
index: 'unloadingAddressArr' index: 'unloadingAddressArr'
}, },
{ {
title: '货物信息', title: '货物信息',
className: 'text-center', className: 'text-center',
width: '120px', width: '170px',
render: 'goodsName' render: 'goodsName'
}, { }, {
title: '承运司机', title: '承运司机',
@ -400,6 +408,7 @@ resourceStatus: any;
title: '创建时间', title: '创建时间',
className: 'text-center', className: 'text-center',
index: 'creationTime', index: 'creationTime',
width: '170px',
}, },
{ {
title: '操作', title: '操作',
@ -464,7 +473,7 @@ resourceStatus: any;
className: 'text-center', className: 'text-center',
index: 'applyUserName' index: 'applyUserName'
}, },
{ title: '状态', index: 'handleStatus', className: 'text-center' }, { title: '状态', index: 'handleStatusLabel', className: 'text-center' },
{ {
title: '操作', title: '操作',
fixed: 'right', fixed: 'right',

View File

@ -1,7 +1,7 @@
/* /*
* @Author: your name * @Author: your name
* @Date: 2021-12-14 14:03:07 * @Date: 2021-12-14 14:03:07
* @LastEditTime: 2021-12-24 17:58:45 * @LastEditTime: 2022-01-13 13:33:14
* @LastEditors: Please set LastEditors * @LastEditors: Please set LastEditors
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE * @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 * @FilePath: \tms-obc-web\src\app\routes\order-management\modal\bulk\update-freight\update-freight.component.ts
@ -179,19 +179,23 @@ export class UpdateFreightComponent implements OnInit {
} }
changeNumVal() { changeNumVal() {
if (this.calculateSub) { console.log(this.sf.valid)
this.calculateSub.unsubscribe(); if(this.sf.valid) {
console.log(this.sf.valid)
} }
this.calculateSub = this.service // if (this.calculateSub) {
.request(this.service.$api_calculate_cost, { billId: this.data.billId, ...this.sf.value, changeCause: '' }) // this.calculateSub.unsubscribe();
.subscribe((res: any) => { // }
if (res) { // this.calculateSub = this.service
Object.assign(this.data, { // .request(this.service.$api_calculate_cost, { billId: this.data.billId, ...this.sf.value, changeCause: '' })
totalFreight: res.totalFreight, // .subscribe((res: any) => {
freight: res.freight, // if (res) {
surcharge: res.surcharge // Object.assign(this.data, {
}); // totalFreight: res.totalFreight,
} // freight: res.freight,
}); // surcharge: res.surcharge
// });
// }
// });
} }
} }

View File

@ -1,8 +1,8 @@
<!-- <!--
* @Author: your name * @Author: your name
* @Date: 2021-12-15 13:17:42 * @Date: 2021-12-15 13:17:42
* @LastEditTime: 2021-12-29 14:48:31 * @LastEditTime: 2022-01-13 13:35:08
* @LastEditors: Please set LastEditors * @LastEditors: your name
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
* @FilePath: \tms-obc-web\src\app\routes\order-management\modal\vehicle\update-freight\update-freight.component.html * @FilePath: \tms-obc-web\src\app\routes\order-management\modal\vehicle\update-freight\update-freight.component.html
--> -->

View File

@ -2,7 +2,7 @@ import { preloaderFinished } from '@delon/theme';
/* /*
* @Author: your name * @Author: your name
* @Date: 2021-12-14 14:03:07 * @Date: 2021-12-14 14:03:07
* @LastEditTime: 2021-12-21 14:56:26 * @LastEditTime: 2022-01-13 13:38:13
* @LastEditors: Please set LastEditors * @LastEditors: Please set LastEditors
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE * @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 * @FilePath: \tms-obc-web\src\app\routes\order-management\modal\bulk\update-freight\update-freight.component.ts
@ -22,6 +22,7 @@ import { _HttpClient } from '@delon/theme';
import { NzMessageService } from 'ng-zorro-antd/message'; import { NzMessageService } from 'ng-zorro-antd/message';
import { NzModalRef } from 'ng-zorro-antd/modal'; import { NzModalRef } from 'ng-zorro-antd/modal';
import { OrderManagementService } from '../../../services/order-management.service'; import { OrderManagementService } from '../../../services/order-management.service';
import { Subscription } from 'rxjs';
@Component({ @Component({
selector: 'app-order-management-vehicle-update-freight', selector: 'app-order-management-vehicle-update-freight',
@ -38,6 +39,8 @@ export class VehicleUpdateFreightComponent implements OnInit {
@Input() @Input()
data: any; data: any;
calculateSub!: Subscription;
constructor(private modal: NzModalRef, private msgSrv: NzMessageService, public service: OrderManagementService) {} constructor(private modal: NzModalRef, private msgSrv: NzMessageService, public service: OrderManagementService) {}
ngOnInit(): void { ngOnInit(): void {
@ -55,6 +58,7 @@ export class VehicleUpdateFreightComponent implements OnInit {
type: 'number', type: 'number',
title: '预付', title: '预付',
default: info.prePay?.price || 0, default: info.prePay?.price || 0,
minimum:0,
readOnly: info.prePay?.paymentStatus === '2' || info.prePay?.paymentStatus === '4', readOnly: info.prePay?.paymentStatus === '2' || info.prePay?.paymentStatus === '4',
ui: { ui: {
prefix: '¥', prefix: '¥',
@ -67,6 +71,7 @@ export class VehicleUpdateFreightComponent implements OnInit {
type: 'number', type: 'number',
title: '到付', title: '到付',
default: info.toPay?.price || 0, default: info.toPay?.price || 0,
minimum:0,
readOnly: info.toPay?.paymentStatus === '2' || info.toPay?.paymentStatus === '4', readOnly: info.toPay?.paymentStatus === '2' || info.toPay?.paymentStatus === '4',
ui: { ui: {
prefix: '¥', prefix: '¥',
@ -79,6 +84,7 @@ export class VehicleUpdateFreightComponent implements OnInit {
// type: 'number', // type: 'number',
// title: '油卡', // title: '油卡',
// default: 0.0, // default: 0.0,
// minimum:0,
// readOnly: this.i.oilCardPayStatus === '1' || this.i.oilCardPayStatus === '3', // readOnly: this.i.oilCardPayStatus === '1' || this.i.oilCardPayStatus === '3',
// ui: { // ui: {
// prefix: '¥', // prefix: '¥',
@ -91,6 +97,7 @@ export class VehicleUpdateFreightComponent implements OnInit {
type: 'number', type: 'number',
title: '回单付', title: '回单付',
default: info.receiptPay?.price || 0, default: info.receiptPay?.price || 0,
minimum:0,
readOnly: info.receiptPay?.paymentStatus === '2' || info.receiptPay?.paymentStatus === '4', readOnly: info.receiptPay?.paymentStatus === '2' || info.receiptPay?.paymentStatus === '4',
ui: { ui: {
prefix: '¥', prefix: '¥',
@ -120,6 +127,39 @@ export class VehicleUpdateFreightComponent implements OnInit {
} }
save(value: any): void { save(value: any): void {
this.service.request(this.service.$api_get_insertFreightChangeWhole, this.getParams()).subscribe(res => {
if (res) {
this.modal.destroy();
this.service.msgSrv.success('变更运费成功');
}
});
}
close(): void {
this.modal.destroy();
}
/**
* 更新数字框
*
*/
changeNumVal() {
if (this.calculateSub) {
this.calculateSub.unsubscribe();
}
this.calculateSub = this.service.request(this.service.$api_getWholeSurchargeDetail, this.getParams()).subscribe((res: any) => {
if (res) {
Object.assign(this.data, {
totalFreight: res.totalFreight,
freight: res.freight,
surcharge: res.surcharge
});
}
});
// 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;
}
getParams() {
const editItems = this.data.list?.filter((info: any) => info.toPay?.paymentStatus !== '2' && info.toPay?.paymentStatus !== '4'); const editItems = this.data.list?.filter((info: any) => info.toPay?.paymentStatus !== '2' && info.toPay?.paymentStatus !== '4');
editItems.forEach((item: any) => { editItems.forEach((item: any) => {
switch (item.costName) { switch (item.costName) {
@ -142,24 +182,6 @@ export class VehicleUpdateFreightComponent implements OnInit {
dtos: editItems, dtos: editItems,
changeCause: this.sf.value.changeCause changeCause: this.sf.value.changeCause
}; };
return params;
this.service.request(this.service.$api_get_insertFreightChangeWhole, params).subscribe((res: any) => {
if (res) {
this.modal.destroy();
this.service.msgSrv.success('变更运费成功');
}
});
}
close(): void {
this.modal.destroy();
}
/**
* 更新数字框
*
*/
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;
} }
} }

View File

@ -193,30 +193,30 @@ export class SupplyManagementBulkComponent implements OnInit {
{ title: '', type: 'checkbox', width: '50px', className: 'text-center' }, { title: '', type: 'checkbox', width: '50px', className: 'text-center' },
{ {
title: '货源编号', title: '货源编号',
width: '100px', width: '200px',
className: 'text-center', className: 'text-center',
render: 'resourceCode' render: 'resourceCode'
}, },
{ title: '服务类型', index: 'serviceTypeLabel', width: '120px', className: 'text-center' }, { title: '服务类型', index: 'serviceTypeLabel', width: '150px', className: 'text-center' },
{ title: '货主', index: 'shipperAppUserName', width: '120px', className: 'text-center' }, { title: '货主', index: 'shipperAppUserName', width: '200px', className: 'text-center' },
{ title: '项目名称', index: 'enterpriseProjectName', width: '120px', className: 'text-center' }, { title: '项目名称', index: 'enterpriseProjectName', width: '200px', className: 'text-center' },
{ title: '关联订单', render: 'orderSn', width: '120px', className: 'text-center' }, { title: '关联订单', render: 'orderSn', width: '200px', className: 'text-center' },
{ title: '货物信息', render: 'goodsInfos', width: '180px', className: 'text-center' }, { title: '货物信息', render: 'goodsInfos', width: '200px', className: 'text-center' },
{ {
title: '装货地', title: '装货地',
className: 'text-center', className: 'text-center',
index: 'loadingAddressArr', index: 'loadingAddressArr',
width: '120px', width: '200px',
}, { }, {
title: '卸货地', title: '卸货地',
className: 'text-center', className: 'text-center',
index: 'unloadingAddressArr', index: 'unloadingAddressArr',
width: '120px', width: '200px',
}, },
{ {
title: '用车需求', title: '用车需求',
className: 'text-center', className: 'text-center',
width: '150px', width: '200px',
render: 'useCarDemand' render: 'useCarDemand'
}, },
{ {
@ -228,7 +228,7 @@ export class SupplyManagementBulkComponent implements OnInit {
{ {
title: '结算依据', title: '结算依据',
className: 'text-center', className: 'text-center',
width: '120px', width: '200px',
index: 'settlementBasis', index: 'settlementBasis',
}, },
{ {

View File

@ -6,8 +6,7 @@ import { ModalHelper, _HttpClient } from '@delon/theme';
import { NzModalService } from 'ng-zorro-antd/modal'; import { NzModalService } from 'ng-zorro-antd/modal';
import { map } from 'rxjs/operators'; import { map } from 'rxjs/operators';
import { SupplyManagementService } from '../../services/supply-management.service'; import { SupplyManagementService } from '../../services/supply-management.service';
import { SupplyManagementVehicleAssignedCarComponent, import { SupplyManagementVehicleAssignedCarComponent } from '../assigned-car/assigned-car.component';
} from '../assigned-car/assigned-car.component';
import { SupplyManagementUpdateExternalSnComponent } from '../update-external-sn/update-external-sn.component'; import { SupplyManagementUpdateExternalSnComponent } from '../update-external-sn/update-external-sn.component';
import { SupplyManagementUpdateFreightComponent } from '../update-freight/update-freight.component'; import { SupplyManagementUpdateFreightComponent } from '../update-freight/update-freight.component';
import { of } from 'rxjs'; import { of } from 'rxjs';
@ -58,7 +57,7 @@ export class SupplyManagementVehicleComponent implements OnInit {
a.resourceStatus = this.resourceStatus; a.resourceStatus = this.resourceStatus;
} }
return { return {
...a, ...a
}; };
} }
get selectedRows() { get selectedRows() {
@ -170,12 +169,11 @@ export class SupplyManagementVehicleComponent implements OnInit {
i: item, i: item,
status: 'anew', status: 'anew',
params: { id }, params: { id },
url: this.service.$api_save_assign_vehicle, url: this.service.$api_save_assign_vehicle
}, },
nzFooter: null, nzFooter: null
}); });
modalRef.afterClose.subscribe((result) => { modalRef.afterClose.subscribe(result => {
if (result) { if (result) {
this.st.reload(); this.st.reload();
} }
@ -236,7 +234,7 @@ export class SupplyManagementVehicleComponent implements OnInit {
nzTitle: '<b>确定取消货源吗?</b>', nzTitle: '<b>确定取消货源吗?</b>',
nzContent: `<b>取消后不可恢复,谨慎操作</b>`, nzContent: `<b>取消后不可恢复,谨慎操作</b>`,
nzOnOk: () => nzOnOk: () =>
this.service.request(this.service.$api_cancle_goods_source, {id: record.id}).subscribe(res => { this.service.request(this.service.$api_cancle_goods_source, { id: record.id }).subscribe(res => {
if (res === true) { if (res === true) {
this.service.msgSrv.success('操作成功!'); this.service.msgSrv.success('操作成功!');
this.st?.reload(); this.st?.reload();
@ -288,17 +286,17 @@ export class SupplyManagementVehicleComponent implements OnInit {
_$expand: (value: boolean) => value _$expand: (value: boolean) => value
}, },
onSearch: (q: any) => { onSearch: (q: any) => {
console.log(q) console.log(q);
if (!!q) { if (!!q) {
return this.service return this.service
.request(this.service.$api_enterpriceList, { enterpriseName: q}) .request(this.service.$api_enterpriceList, { enterpriseName: q })
.pipe(map((res: any) => (res as any[]).map((i) => ({ label: i.enterpriseName, value: i.id } as SFSchemaEnum)))) .pipe(map((res: any) => (res as any[]).map(i => ({ label: i.enterpriseName, value: i.id } as SFSchemaEnum))))
.toPromise(); .toPromise();
} else { } else {
return of([]); return of([]);
} }
}, }
} as SFSelectWidgetSchema, } as SFSelectWidgetSchema
}, },
enterpriseProjectId: { enterpriseProjectId: {
type: 'string', type: 'string',
@ -306,11 +304,10 @@ export class SupplyManagementVehicleComponent implements OnInit {
ui: { ui: {
widget: 'select', widget: 'select',
visibleIf: { visibleIf: {
_$expand: (value: boolean) => value, _$expand: (value: boolean) => value
}, },
asyncData: () => asyncData: () => this.shipperSrv.getEnterpriseProject()
this.shipperSrv.getEnterpriseProject() } as SFSelectWidgetSchema
} as SFSelectWidgetSchema,
}, },
serviceType: { serviceType: {
title: '服务类型', title: '服务类型',
@ -364,39 +361,40 @@ export class SupplyManagementVehicleComponent implements OnInit {
className: 'text-center', className: 'text-center',
render: 'resourceCode' render: 'resourceCode'
}, },
// { {
// title: '服务类型', title: '货主',
// index: 'serviceType', index: 'shipperAppUserName',
// width: '120px', width: '180px',
// className: 'text-center', className: 'text-center' },
// type: 'enum',
// enum: { '1': '抢单', '2': '指派' }
// },
{ title: '货主', index: 'shipperAppUserName', width: '120px' },
{ {
title: '项目名称', title: '项目名称',
index: 'enterpriseProjectName', index: 'enterpriseProjectName',
width: '120px' width: '180px',
className: 'text-center'
}, },
{ {
title: '装货地', title: '装货地',
index: 'loadingAddressArr', index: 'loadingAddressArr',
width: '200px' width: '200px',
className: 'text-center'
}, },
{ {
title: '卸货地', title: '卸货地',
index: 'unloadingAddressArr', index: 'unloadingAddressArr',
width: '200px' width: '200px',
className: 'text-center'
}, },
{ {
title: '货物名称', title: '货物名称',
index: 'goodsName', index: 'goodsName',
width: '150px' width: '150px',
className: 'text-center'
}, },
{ {
title: '货物数量', title: '货物数量',
width: '130px', width: '200px',
index: 'goodsNumber', index: 'goodsNumber',
className: 'text-center',
format: item => item.goodsNumber.join('/') format: item => item.goodsNumber.join('/')
}, },
{ {

View File

@ -233,13 +233,15 @@ export class VehicleComponentsAuditDetailComponent implements OnInit {
return value; return value;
} }
viewEvaluate(item: any) { viewEvaluate(item: any) {
this.modal.createStatic(VehicleImgViewComponent, { i: item } ).subscribe(() => { this.modal.createStatic(VehicleImgViewComponent, { i: item } ).subscribe((i) => {
this.st.reload(); this.st.reload();
this.getDetailList()
}); });
} }
updateEvaluate(item: any) { updateEvaluate(item: any) {
this.modal.createStatic(VehicleComponentsListEditComponent, { i: item }).subscribe(() => { this.modal.createStatic(VehicleComponentsListEditComponent, { i: item }).subscribe((i) => {
this.st.reload(); this.st.reload();
this.getDetailList()
}); });
} }
} }

View File

@ -200,6 +200,7 @@ export class VehicleComponentsListDetailComponent implements OnInit {
viewEvaluate(item: any) { viewEvaluate(item: any) {
this.modal.createStatic(VehicleImgViewComponent, { i: item } ).subscribe(() => { this.modal.createStatic(VehicleImgViewComponent, { i: item } ).subscribe(() => {
this.st.reload(); this.st.reload();
this.getDetailList();
}); });
} }
/** /**
@ -208,6 +209,7 @@ export class VehicleComponentsListDetailComponent implements OnInit {
updateEvaluate(item: any) { updateEvaluate(item: any) {
this.modal.createStatic(VehicleComponentsListEditComponent, { i: item }).subscribe(() => { this.modal.createStatic(VehicleComponentsListEditComponent, { i: item }).subscribe(() => {
this.st.reload(); this.st.reload();
this.getDetailList();
}); });
} }
handleOK() { handleOK() {

View File

@ -116,7 +116,7 @@ export class VehicleComponentsListEditComponent implements OnInit {
} }
this.service.request(this.service.$api_get_upLoadCarProtocal, params).subscribe((res) => { this.service.request(this.service.$api_get_upLoadCarProtocal, params).subscribe((res) => {
if(res) { if(res) {
this.modal.destroy(); this.modal.destroy(true);
this.service.msgSrv.success('上传协议成功!') this.service.msgSrv.success('上传协议成功!')
} else { } else {
this.service.msgSrv.error(res.msg) this.service.msgSrv.error(res.msg)

View File

@ -1,7 +1,7 @@
/* /*
* @Author: your name * @Author: your name
* @Date: 2021-12-07 17:30:18 * @Date: 2021-12-07 17:30:18
* @LastEditTime: 2021-12-16 15:31:13 * @LastEditTime: 2022-01-13 11:27:12
* @LastEditors: Please set LastEditors * @LastEditors: Please set LastEditors
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
* @FilePath: \tms-obc-web\src\app\routes\vehicle\components\list\img-view\img-view.component.ts * @FilePath: \tms-obc-web\src\app\routes\vehicle\components\list\img-view\img-view.component.ts
@ -27,7 +27,7 @@ export class VehicleImgViewComponent implements OnInit {
} }
cancel() { cancel() {
this.modal.destroy(); this.modal.destroy(true);
} }
// 驳回 // 驳回
reject() { reject() {
@ -37,7 +37,7 @@ export class VehicleImgViewComponent implements OnInit {
} }
this.service.request(this.service.$api_get_auditCarProtocal_audit, params).subscribe((res) => { this.service.request(this.service.$api_get_auditCarProtocal_audit, params).subscribe((res) => {
if(res) { if(res) {
this.modal.destroy(); this.modal.destroy(true);
this.service.msgSrv.success('已驳回') this.service.msgSrv.success('已驳回')
} else { } else {
this.service.msgSrv.error(res.msg) this.service.msgSrv.error(res.msg)
@ -52,7 +52,7 @@ export class VehicleImgViewComponent implements OnInit {
} }
this.service.request(this.service.$api_get_auditCarProtocal_audit, params).subscribe((res) => { this.service.request(this.service.$api_get_auditCarProtocal_audit, params).subscribe((res) => {
if(res) { if(res) {
this.modal.destroy(); this.modal.destroy(true);
this.service.msgSrv.success('已通过') this.service.msgSrv.success('已通过')
} else { } else {
this.service.msgSrv.error(res.msg) this.service.msgSrv.error(res.msg)