Merge branch 'develop' of https://gitlab.eascs.com/tms-ui/tms-obc-web into develop

This commit is contained in:
Taric Xin
2021-12-21 15:47:58 +08:00
37 changed files with 2537 additions and 840 deletions

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: 2021-12-20 17:11:27 * @LastEditTime: 2021-12-21 11:19:15
* @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
@ -38,10 +38,15 @@
</nz-card> </nz-card>
<nz-card> <nz-card>
<nz-tabset (nzSelectedIndexChange)="selectChange($event)" [nzTabBarExtraContent]="extraTemplate"> <nz-tabset (nzSelectedIndexChange)="selectChange($event)"
<nz-tab *ngFor="let tab of tabs; let i = index" [nzTitle]="tab.name + ' (' + tab.count + ') '" (nzClick)="tabChange(i)"> [nzTabBarExtraContent]="extraTemplate">
</nz-tab> <nz-tab [nzTitle]="'全部'"></nz-tab>
</nz-tabset> <nz-tab [nzTitle]="'待发车('+tabs?.stayQuantity+')'"></nz-tab>
<nz-tab [nzTitle]="'运输中('+tabs?.receivedQuantity+')'"></nz-tab>
<nz-tab [nzTitle]="'待签收('+tabs?.cancelQuantity+')'"></nz-tab>
<nz-tab [nzTitle]="'已完成'"></nz-tab>
<nz-tab [nzTitle]="'已取消'"></nz-tab>
</nz-tabset>
<div style="margin-top: 15px;"> <div style="margin-top: 15px;">
<st <st
#st #st

View File

@ -38,6 +38,7 @@ export class OrderManagementBulkComponent implements OnInit {
columnsFloat: STColumn[] = []; columnsFloat: STColumn[] = [];
columnsFloatView: STColumn[] = []; columnsFloatView: STColumn[] = [];
demoValue: any; demoValue: any;
resourceStatus: any;
datass: any = [ datass: any = [
{ {
one: '1', one: '1',
@ -52,51 +53,54 @@ export class OrderManagementBulkComponent implements OnInit {
id: 2 id: 2
}, },
]; ];
tabs = [ { tabs = {
name: '全部', cancelQuantity: 0,
type: 5, receivedQuantity: 0,
count: 0, stayQuantity: 0
}, };
{
name: '待发车',
type: 5,
count: 0,
},
{
name: '运输中',
type: 5,
count: 0,
},
{
name: '代签收',
type: 5,
count: 0,
},
{
name: '已完成',
type: 5,
count: 0,
},
{
name: '已取消',
type: 5,
count: 0,
},
];
constructor(public service: OrderManagementService, private modal: NzModalService,public service2: ShipperBaseService) { } constructor(public service: OrderManagementService, private modal: NzModalService,public service2: ShipperBaseService) { }
/** /**
* 查询参数 * 查询参数
*/ */
get reqParams() { get reqParams() {
const a:any = {};
if(this.resourceStatus) {
a.billStatus = this.resourceStatus + 1;
}
return { return {
...a,
...this.sf?.value, ...this.sf?.value,
}; };
} }
get selectedRows() { get selectedRows() {
return this.st?.list.filter((item) => item.checked) || []; return this.st?.list.filter((item) => item.checked) || [];
} }
getGoodsSourceStatistical() {
this.service.request(this.service.$api_getBulkStatistical).subscribe(res => {
if (res) {
res.forEach((element: any) => {
if(element.statusLabel === '待发车') {
this.tabs.stayQuantity = element.quantity
} else if (element.statusLabel === '待接单') {
this.tabs.receivedQuantity = element.quantity
} else if (element.statusLabel === '待签收') {
this.tabs.cancelQuantity = element.quantity
}
});
}
})
}
selectChange(e: number) {
console.log(e);
this.resourceStatus = e;
this.initST();
setTimeout(() => {
this.st.load();
}, 500);
}
ngOnInit(): void { ngOnInit(): void {
this.getGoodsSourceStatistical()
this.initSF(); this.initSF();
this.initST(); this.initST();
this.initSTFloat(); this.initSTFloat();
@ -443,15 +447,7 @@ export class OrderManagementBulkComponent implements OnInit {
}, },
{ {
text: '取消订单', text: '取消订单',
click: (_record) => this.confirmReceipt(_record), click: (_record) => this.cancellation(_record),
},
{
text: '确认发车',
click: (_record) => this.sureDepart(_record),
},
{
text: '确认到车',
click: (_record) => this.sureArrive(_record),
}, },
], ],
}, },
@ -548,9 +544,6 @@ export class OrderManagementBulkComponent implements OnInit {
); );
} }
selectChange(e: number) {
console.log(e);
}
/** /**
* 导入货源 * 导入货源
*/ */
@ -606,14 +599,25 @@ export class OrderManagementBulkComponent implements OnInit {
*变更运费 *变更运费
*/ */
updateFreight(item: any) { updateFreight(item: any) {
const modalRef = this.modal.create({ this.service.request(this.service.$api_getFreightChangeBulkDetail, { id: item.id }).subscribe(data => {
nzTitle: '变更运费', if (data) {
nzWidth: '50%', const modal = this.modal.create({
nzContent: UpdateFreightComponent, nzTitle: '变更运费',
nzComponentParams: { nzWidth: 580,
i: item nzContent: UpdateFreightComponent,
}, nzComponentParams: { data },
nzFooter: null nzOnOk: sin => {
this.service.request(this.service.$api_insertFreightChangeBulk, { billId: item.id, ...sin.sf.value }).subscribe(res => {
if (res) {
this.service.msgSrv.success('变更运费成功');
modal.destroy();
this.st.reload();
}
});
return false;
}
});
}
}); });
} }
@ -624,19 +628,6 @@ export class OrderManagementBulkComponent implements OnInit {
nzTitle: '确认签收', nzTitle: '确认签收',
nzWidth: '50%', nzWidth: '50%',
nzContent: ConfirReceiptComponent, nzContent: ConfirReceiptComponent,
nzComponentParams: {
i: item
},
nzFooter: null
});
}
// *确认发车
sureDepart(item: any) {
const modalRef = this.modal.create({
nzTitle: '确认发车',
nzWidth: '50%',
nzContent: SureDepartComponent,
nzComponentParams: { nzComponentParams: {
i: item, i: item,
Status: 1 Status: 1
@ -644,20 +635,35 @@ export class OrderManagementBulkComponent implements OnInit {
nzFooter: null nzFooter: null
}); });
} }
// *确认到车 userAction() {
let params: any[] = [];
sureArrive(item: any) { this.selectedRows.forEach(item => {
const modalRef = this.modal.create({ params.push(item.id);
nzTitle: '确认到车', });
nzWidth: '50%', console.log(this.selectedRows)
nzContent: SureArriveComponent, console.log(params)
nzComponentParams: { this.service.request(this.service.$api_get_batchSignBulkOrder, params).subscribe(res => {
i: item if (res) {
}, console.log(res);
nzFooter: null } else {
this.service.msgSrv.error(res.msg);
}
}); });
} }
userAction() { // 取消订单
cancellation(item: any) {
} // api_get_cancelAnOrder
this.modal.confirm({
nzTitle: '<b>确定取消该订单吗?</b>',
nzContent: `<b>取消后无法恢复,请确认</b>`,
nzOnOk: () =>
this.service.request(this.service.$api_get_cancelAnOrder, {id: item.id}).subscribe((res) => {
if (res === true) {
this.service.msgSrv.success('操作成功!');
this.st?.reload();
this.initST();
}
}),
})
}
} }

View File

@ -1,138 +1,165 @@
<!-- <!--
* @Author: your name * @Author: your name
* @Date: 2021-12-03 15:31:52 * @Date: 2021-12-03 15:31:52
* @LastEditTime: 2021-12-07 15:09:44 * @LastEditTime: 2021-12-21 14:20:15
* @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\components\vehicle-detail\vehicle-detail.component.html * @FilePath: \tms-obc-web\src\app\routes\order-management\components\vehicle-detail\vehicle-detail.component.html
--> -->
<page-header-wrapper [title]="''" [logo]="logo"> <page-header-wrapper [title]="''" [logo]="logo" [content]="headerContent">
<ng-template #logo> <ng-template #logo>
<button nz-button nz-tooltip nzTooltipTitle="返回上一页" (click)="goBack()"> <button nz-button nz-tooltip nzTooltipTitle="返回上一页" (click)="goBack()">
<i nz-icon nzType="left" nzTheme="outline"></i> <i nz-icon nzType="left" nzTheme="outline"></i>
</button> </button>
</ng-template> </ng-template>
</page-header-wrapper> <ng-template #headerContent>
<nz-card> <div class="mb-xs" nz-row>
<nz-spin *ngIf="!i" class="modal-spin"></nz-spin> <h4 class="ml-md">订单号: {{ i?.billCode }}</h4>
<div nz-row>
<div nz-col nzSpan="4">
<sv-container class="bdr">
<sv label="订单号" col="1">{{ i?.no }}</sv>
<sv-title class="text-center text-lg">待接单</sv-title>
<sv-title>
<div class="">
<a class="btn-size" (click)="hand()">指派车队长</a>
<!-- <a class="btn-size m-lg mr-lg">取消货源</a>
<a class="btn-size">再下一单</a> -->
</div>
</sv-title>
</sv-container>
</div> </div>
<div nz-col nzSpan="16" class="approval-status"> <div nz-row style="display: flex; justify-content: end;">
<nz-steps style="width: 80%; margin: 0 auto" [nzLabelPlacement]="'vertical'"> <div nz-col nzSpan="10">
<nz-step nzStatus="finish" nzIcon="user" [nzDescription]="i?.createAt" nzTitle="下单"></nz-step> <button nz-button >取消货源</button>
<nz-step nzStatus="finish" nzIcon="solution" nzTitle="完结"></nz-step> <button nz-button
>重新指派</button>
<button nz-button >修改货源</button>
<button nz-button nzType="primary" nzGhost >再下一单</button>
</div>
</div>
<div sv-container>
<sv label="货主">{{ i?.goodsInfoList[0].shipperAppUserName }} </sv>
<sv label="所属项目">{{i?.enterpriseProjectId}}</sv>
<sv label="服务类型">{{i?.createUserId}}</sv>
<sv label="录单员">{{i?.dispatchName}} 18100000000 </sv>
<sv label="调度员">{{i?.serviceTypeLabel}} </sv>
</div>
</ng-template>
</page-header-wrapper>
<nz-card nzTitle="货源进度">
<div class="approval-status">
<div style="width: 60%; margin: 0 auto">
<nz-steps [nzLabelPlacement]="'vertical'">
<nz-step [nzStatus]="i?.resourceStatus !== '1'?'finish':'process'" nzIcon="solution"
[nzDescription]="i?.createAt" nzTitle="下单"></nz-step>
<nz-step *ngIf="i?.resourceStatus === '1' || i?.resourceStatus === '2' "
[nzStatus]="i?.resourceStatus=== '1'? 'wait':'finish'" nzIcon="file-done" [nzTitle]="'接单'"></nz-step>
<nz-step nzStatus="finish" nzIcon="close-circle" nzTitle="取消货源" *ngIf="i?.resourceStatus === '3'"></nz-step>
</nz-steps> </nz-steps>
</div> </div>
</div> </div>
<nz-divider></nz-divider> </nz-card>
<div sv-container *ngIf="i">
<sv label="项目名称">{{ i?.owner }}</sv>
<sv label="调度员">32943898021309809423</sv>
<sv label="承诺付款时间">3321944288191034921</sv>
<sv label="服务类型">18112345678</sv>
</div>
<nz-divider></nz-divider>
<div nz-row>
<div nz-col nzSpan="6">
<div class="source-info">
<h3>装卸货信息</h3>
<p>装货地:广东省深圳市龙岗区怡亚通大厦</p>
<p>联系人:奥利给/13680058545</p>
<p>卸货地广东省深圳市福田区岗厦村9巷8号405新村</p>
<p>联系人:花花世界/13680058545</p>
<p>发货日期广东省深圳市福田区岗厦村9巷8号405新村</p>
<p>卸货日期:花花世界/13680058545</p>
</div>
</div>
<div nz-col nzSpan="5">
<div class="source-info bdr bdl pl-md">
<h3>货物信息</h3>
<p>货物名称:广东省深圳市龙岗区怡亚通大厦</p>
<p>重量/体积广东省深圳市福田区岗厦村9巷8号405新村</p>
<p>车型/车长:花花世界/13680058545</p>
</div>
</div>
<div nz-col nzSpan="5">
<div class="source-info bdr bdl pl-md">
<h3>托运信息</h3>
<p>公司名称:广东省深圳市龙岗区怡亚通大厦</p>
<p>联系人广东省深圳市福田区岗厦村9巷8号405新村</p>
</div>
</div>
<div nz-col nzSpan="5">
<div class="source-info bdr pl-md">
<h3>承运信息</h3>
<p>司机:广东省深圳市龙岗区怡亚通大厦</p>
<p>车牌号广东省深圳市福田区岗厦村9巷8号405新村</p>
<p>车型/车长/承重:{{'拖车'}} | {{'4.5米'}} | {{'15吨'}}</p>
</div>
</div>
<div class="source-info pl-md">
<h3>补充信息</h3>
<p style="color: #1890ff;">协议附件</p>
<p style="color: #1890ff;"> 装车附件</p>
<p style="color: #1890ff;">卸货附件</p>
<p style="color: #1890ff;">回单附件</p>
</div>
</div>
<nz-divider></nz-divider>
<div nz-row>
<div class="freight-info-box">
<h3>运费信息</h3>
<div class="text-right">
<p><label class="freigth-label">收款人:</label><span>{{400 | currency }}</span></p>
<p><label class="freigth-label">预付:</label><span>{{400 | currency }}</span></p>
<p><label class="freigth-label">油卡:</label><span>{{400 | currency }}</span></p>
<p><label class="freigth-label">到付:</label><span>{{400 | currency }}</span></p>
<p><label class="freigth-label">回单付:</label><span>{{400 | currency}}</span></p>
<p><label class="freigth-label">附加费:</label><span>{{400 | currency }}</span></p>
</div>
</div>
<nz-divider></nz-divider>
<div class="freight-info-box" nz-row>
<div nz-col nzSpan="24">
<h3 class="text-right"><label>总计 :</label> <span class="text-error-dark text-xl">{{400 | currency }}</span></h3>
<h3 class="text-right">未支付</h3>
</div>
</div> <nz-card nzTitle="装卸货信息(一装一卸)">
</div> <div class="mt-md">
<nz-divider></nz-divider> <div nz-row [nzGutter]="24">
<div style="display: flex; justify-content: space-evenly;"> <div nz-col [nzSpan]="12">
<div> <div class="handling-info p-md">
<div> <div class="flex" *ngFor="let item of i?.unLoadingPlaceList">
<span class="leftPadding">司机运输费</span> <div *ngIf="item.type === '1'" class="loading-row">
<span class="leftPadding">1000.00</span> <div class="handling-info-icon loading-bg"></div>
<span class="leftPadding">未支付</span> <div class="info">
<h4>装货地:{{item?.province}}{{item.city}}{{item.area}}{{item.detailedAddress}}</h4>
<p>联系人:{{item.appUserName}}/{{item.contractTelephone}}</p>
</div>
</div>
</div>
<p class="time-info">装货时间:{{i?.loadingTime}}</p>
</div>
</div> </div>
</div> <div nz-col [nzSpan]="12">
<div> <div class="handling-info p-md">
<div> <div class="flex" *ngFor="let item of i?.unLoadingPlaceList">
<span class="leftPadding">司机运输费</span> <div *ngIf="item.type === '2'" class="loading-row">
<span class="leftPadding">1000.00</span> <div class="handling-info-icon unloaing-bg"></div>
<span class="leftPadding">未支付</span> <div class="info">
</div> <h4>卸货地:{{item?.province}}{{item.city}}{{item.area}}{{item.detailedAddress}}</h4>
<div> <p>联系人:{{item.appUserName}}/{{item.contractTelephone}}</p>
<span class="leftPadding">附加费</span> </div>
<span class="leftPadding">1000.00</span> </div>
<span class="leftPadding">未支付</span> </div>
<p class="time-info">卸货时间:{{i?.unloadingTime}}</p>
</div>
</div> </div>
</div> </div>
</div> </div>
<nz-divider></nz-divider> </nz-card>
<nz-card nzTitle="基本信息">
<sv-container col="1">
<sv label="网络货运人">
{{i?.goodsName}}
</sv>
<sv label="货物名称">
{{i?.weight}}顿,{{i?.volume}}方,{{i?.number}}件
</sv>
</sv-container>
<sv-container col="2">
<sv label="货物数量">
{{i?.goodsName}}
</sv>
<sv label="用车需求">
{{i?.weight}}顿,{{i?.volume}}方,{{i?.number}}件
</sv>
<sv label="承运司机">
{{i?.weight}}顿,{{i?.volume}}方,{{i?.number}}件
</sv>
<sv label="车型车长载重">
{{i?.weight}}顿,{{i?.volume}}方,{{i?.number}}件
</sv>
</sv-container>
</nz-card>
<nz-card nzTitle="保险待定">
</nz-card>
<nz-card nzTitle="运费信息">
<st #st [data]="i?.auditRecordList" [columns]="logColumns" [ps]="0" [page]="{ show: false, showSize: false }">
</st>
<div>总计:{{i?.total | currency: '¥'}}运费¥3500.00附加运费¥191.98附加费率3.5%</div>
<div>收款人:</div>
</nz-card>
<nz-card nzTitle="附件信息">
<sv-container>
<sv label="协议附件">
{{i?.supplementaryInformationVO?.stateReceipt?'是':'否'}}
</sv>
</sv-container>
<sv-container col="2" class="mt-md">
<sv label="装货凭证">
{{i?.supplementaryInformationVO?.remarks}}
</sv>
<sv label="卸货凭证">
{{i?.supplementaryInformationVO?.remarks}}
</sv>
</sv-container>
</nz-card>
<nz-card nzTitle="补充信息">
<sv-container>
<sv label="是否回单">
{{i?.supplementaryInformationVO?.stateReceipt?'是':'否'}}
</sv>
<sv label="回单类型">
{{i?.supplementaryInformationVO?.receiptTypeLabel}}
</sv>
<sv label="联系人">
{{i?.supplementaryInformationVO?.receiptUserName}} / {{i?.supplementaryInformationVO?.phon}}
</sv>
<sv label="所在地区">
{{i?.supplementaryInformationVO?.area}}
</sv>
<sv label="详细地址">
{{i?.supplementaryInformationVO?.address}}
</sv>
</sv-container>
<sv-container col="1" class="mt-md">
<sv label="备注">
{{i?.supplementaryInformationVO?.remarks}}
</sv>
</sv-container>
</nz-card>
<nz-card>
<div nz-row> <div nz-row>
<nz-card nzTitle="轨迹信息" style="width: 100%;" > <nz-card nzTitle="轨迹信息" style="width: 100%;" >
<div nz-row > <div nz-row >

View File

@ -1,7 +1,7 @@
/* /*
* @Author: your name * @Author: your name
* @Date: 2021-12-03 15:31:52 * @Date: 2021-12-03 15:31:52
* @LastEditTime: 2021-12-20 09:35:33 * @LastEditTime: 2021-12-21 11:22:23
* @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\components\vehicle-detail\vehicle-detail.component.ts * @FilePath: \tms-obc-web\src\app\routes\order-management\components\vehicle-detail\vehicle-detail.component.ts
@ -37,13 +37,18 @@ export class OrderManagementVehicleDetailComponent implements OnInit {
} }
ngOnInit(): void { ngOnInit(): void {
this.service.http.get(`/user/${this.id}?_allow_anonymous=true&_allow_badcode=true`).subscribe(res => { console.log(this.id)
console.log(res); this.initData()
this.i = res
});
} }
initData() {
this.service.request(this.service.$api_get_getWholeBillDetail, {id: this.id}).subscribe(res => {
console.log(res)
if (res) {
this.i =res;
}
})
}
hand() { hand() {
this.modalService.create({ this.modalService.create({

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: 2021-12-20 17:07:17 * @LastEditTime: 2021-12-21 13:48:55
* @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
@ -38,10 +38,15 @@
</nz-card> </nz-card>
<nz-card> <nz-card>
<nz-tabset (nzSelectedIndexChange)="selectChange($event)" > <nz-tabset (nzSelectedIndexChange)="selectChange($event)"
<nz-tab *ngFor="let tab of tabs; let i = index" [nzTitle]="tab.name + ' (' + tab.count + ') '" (nzClick)="tabChange(i)"> [nzTabBarExtraContent]="extraTemplate">
</nz-tab> <nz-tab [nzTitle]="'全部'"></nz-tab>
</nz-tabset> <nz-tab [nzTitle]="'待发车('+tabs?.stayQuantity+')'"></nz-tab>
<nz-tab [nzTitle]="'运输中('+tabs?.receivedQuantity+')'"></nz-tab>
<nz-tab [nzTitle]="'待签收('+tabs?.cancelQuantity+')'"></nz-tab>
<nz-tab [nzTitle]="'已完成'"></nz-tab>
<nz-tab [nzTitle]="'已取消'"></nz-tab>
</nz-tabset>
<div style="margin-top: 15px;"> <div style="margin-top: 15px;">
<st <st
#st #st
@ -55,7 +60,7 @@
> >
<ng-template st-row="billCode" let-item let-index="index"> <ng-template st-row="billCode" let-item let-index="index">
<a [routerLink]="'/waybill-management/vehicle-detail/'+item.id">{{item.wayBillCode}}</a> <a [routerLink]="'/order-management/vehicle-detail/'+item.id">{{item.wayBillCode}}</a>
<div> <div>
<span>{{item?.billStatusLabel}}</span> <span>{{item?.billStatusLabel}}</span>
</div> </div>
@ -205,3 +210,21 @@
<button nz-button nzType="primary" (click)="handleOK()">确定</button> <button nz-button nzType="primary" (click)="handleOK()">确定</button>
</ng-template> </ng-template>
</nz-modal> </nz-modal>
<ng-template #extraTemplate>
<div>
<button nz-button nzType="primary" nzGhost nz-popconfirm
[nzPopconfirmTitle]="enable" (nzOnConfirm)="userAction()" nzPopconfirmPlacement="bottomRight">
批量签收
</button>
</div>
</ng-template>
<ng-template #enable>
<div class="ant-popover-message">
<i nz-icon nzType="info-circle" nzTheme="fill"></i>
<div class="ant-popover-message-title ng-star-inserted self-ant-popover-title" style="font-size: 16px">已选择{{selectedRows?.length || 0}}条订单,确认批量签收吗?
</div>
<div class="ant-popover-message-title ng-star-inserted">
签收后不可再修改运费,请确保运费等信息准确无误后,再进行签收。
</div>
</div>
</ng-template>

View File

@ -6,6 +6,8 @@ import { ShipperBaseService } from '@shared';
import { NzModalService } from 'ng-zorro-antd/modal'; import { NzModalService } from 'ng-zorro-antd/modal';
import { of } from 'rxjs'; import { of } from 'rxjs';
import { map } from 'rxjs/operators'; import { map } from 'rxjs/operators';
import { UpdateFreightComponent } from '../../modal/bulk/update-freight/update-freight.component';
import { OneCarOrderCancelComponent } from '../../modal/vehicle/cancel/cancel.component';
import { VehicleConfirReceiptComponent } from '../../modal/vehicle/confir-receipt/confir-receipt.component'; import { VehicleConfirReceiptComponent } from '../../modal/vehicle/confir-receipt/confir-receipt.component';
import { VehicleSureArriveComponent } from '../../modal/vehicle/sure-arrive/sure-arrive.component'; import { VehicleSureArriveComponent } from '../../modal/vehicle/sure-arrive/sure-arrive.component';
import { VehicleSureDepartComponent } from '../../modal/vehicle/sure-depart/sure-depart.component'; import { VehicleSureDepartComponent } from '../../modal/vehicle/sure-depart/sure-depart.component';
@ -51,47 +53,17 @@ export class OrderManagementVehicleComponent implements OnInit {
id: 2 id: 2
}, },
]; ];
tabs = [ { tabs = {
name: '全部', cancelQuantity: 0,
type: 5, receivedQuantity: 0,
count: 0, stayQuantity: 0
}, };
{ resourceStatus: any;
name: '待发车',
type: 5,
count: 0,
},
{
name: '运输中',
type: 5,
count: 0,
},
{
name: '代签收',
type: 5,
count: 0,
},
{
name: '已完成',
type: 5,
count: 0,
},
{
name: '已取消',
type: 5,
count: 0,
},
];
constructor(public service: OrderManagementService, private modal: NzModalService,public service2: ShipperBaseService,) { } constructor(public service: OrderManagementService, private modal: NzModalService,public service2: ShipperBaseService,) { }
/** /**
* 查询参数 * 查询参数
*/ */
get reqParams() {
return {
...this.sf?.value,
};
}
get changeParams() { get changeParams() {
return { return {
id: this.changeId id: this.changeId
@ -102,17 +74,42 @@ export class OrderManagementVehicleComponent implements OnInit {
id: this.changeViewId id: this.changeViewId
}; };
} }
get reqParams() {
const a:any = {};
if(this.resourceStatus) {
a.billStatus = this.resourceStatus + 1;
}
return {
...a,
...this.sf?.value,
};
}
get selectedRows() { get selectedRows() {
return this.st?.list.filter((item) => item.checked) || []; return this.st?.list.filter((item) => item.checked) || [];
} }
ngOnInit(): void { ngOnInit(): void {
this.getGoodsSourceStatistical()
this.initSF(); this.initSF();
this.initST(); this.initST();
this.initSTFloat(); this.initSTFloat();
this.initSTFloatView(); this.initSTFloatView();
} }
getGoodsSourceStatistical() {
this.service.request(this.service.$api_statisticalStatus).subscribe(res => {
if (res) {
res.forEach((element: any) => {
if(element.statusLabel === '待发车') {
this.tabs.stayQuantity = element.quantity
} else if (element.statusLabel === '待接单') {
this.tabs.receivedQuantity = element.quantity
} else if (element.statusLabel === '待签收') {
this.tabs.cancelQuantity = element.quantity
}
});
}
})
}
/** /**
* 初始化查询表单 * 初始化查询表单
@ -391,16 +388,10 @@ export class OrderManagementVehicleComponent implements OnInit {
}, },
{ {
text: '取消订单', text: '取消订单',
click: (_record) => this.confirmReceipt(_record), click: (_record) => this.cancellation(_record),
}, iif: item => item.externalSn === '1' || item.externalSn === 1,
{
text: '确认发车',
click: (_record) => this.sureDepart(_record),
},
{
text: '确认到车',
click: (_record) => this.sureArrive(_record),
}, },
], ],
}, },
]; ];
@ -439,6 +430,7 @@ export class OrderManagementVehicleComponent implements OnInit {
{ {
text: '撤销', text: '撤销',
click: (_record) => this.revoke(_record), click: (_record) => this.revoke(_record),
iif: item => item.handleStatus === '1' || item.handleStatus === 1,
}, },
], ],
}, },
@ -502,6 +494,11 @@ export class OrderManagementVehicleComponent implements OnInit {
selectChange(e: number) { selectChange(e: number) {
console.log(e); console.log(e);
this.resourceStatus = e;
this.initST();
setTimeout(() => {
this.st.load();
}, 500);
} }
/** /**
* 导入货源 * 导入货源
@ -562,14 +559,17 @@ export class OrderManagementVehicleComponent implements OnInit {
*变更运费 *变更运费
*/ */
updateFreight(item: any) { updateFreight(item: any) {
const modalRef = this.modal.create({ this.service.request(this.service.$api_get_getFreightChangeWholeDetail, { id: item.id }).subscribe(data => {
nzTitle: '变更运费', if (data) {
nzWidth: '50%', const modal = this.modal.create({
nzContent: VehicleUpdateFreightComponent, nzTitle: '变更运费',
nzComponentParams: { nzWidth: 580,
i: item nzContent: VehicleUpdateFreightComponent,
}, nzComponentParams: { data: { ...data, id: item.id } },
nzFooter: null nzFooter: null
});
modal.afterClose.subscribe(_ => this.st.reload());
}
}); });
} }
@ -581,37 +581,12 @@ export class OrderManagementVehicleComponent implements OnInit {
nzWidth: '50%', nzWidth: '50%',
nzContent: VehicleConfirReceiptComponent, nzContent: VehicleConfirReceiptComponent,
nzComponentParams: { nzComponentParams: {
i: item i: item,
Status: 2
}, },
nzFooter: null nzFooter: null
}); });
} }
// *确认发车
sureDepart(item: any) {
const modalRef = this.modal.create({
nzTitle: '确认发车',
nzWidth: '50%',
nzContent: VehicleSureDepartComponent,
nzComponentParams: {
i: item,
Status: 2
},
nzFooter: null
});
}
// 确认到车
sureArrive(item: any) {
const modalRef = this.modal.create({
nzTitle: '确认到车',
nzWidth: '50%',
nzContent: VehicleSureArriveComponent,
nzComponentParams: {
i: item
},
nzFooter: null
});
}
revoke(item: any) { revoke(item: any) {
this.modal.confirm({ this.modal.confirm({
nzTitle: '是否确定立即撤销费用变更!</i>', nzTitle: '是否确定立即撤销费用变更!</i>',
@ -627,4 +602,35 @@ export class OrderManagementVehicleComponent implements OnInit {
}) })
}); });
} }
// 取消订单
cancellation(item: any) {
// api_get_cancelAnOrder
this.modal.confirm({
nzTitle: '<b>确定取消该订单吗?</b>',
nzContent: `<b>取消后无法恢复,请确认</b>`,
nzOnOk: () =>
this.service.request(this.service.$api_get_cancelAnOrder, {id: item.id}).subscribe((res) => {
if (res === true) {
this.service.msgSrv.success('操作成功!');
this.st?.reload();
this.initST();
}
}),
})
}
userAction() {
let params: any[] = [];
this.selectedRows.forEach(item => {
params.push(item.id);
});
console.log(this.selectedRows)
console.log(params)
this.service.request(this.service.$api_get_batchSignWholeOrder, params).subscribe(res => {
if (res) {
console.log(res);
} else {
this.service.msgSrv.error(res.msg);
}
});
}
} }

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-14 15:43:01 * @LastEditTime: 2021-12-21 14:47:26
* @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.html * @FilePath: \tms-obc-web\src\app\routes\order-management\modal\bulk\update-freight\update-freight.component.html
@ -15,29 +15,31 @@ nzMessage="签收后不可再修改运费,请确保运费等信息准确无误
<sv-container col="1"> <sv-container col="1">
<sv label="货物单价"> <sv label="货物单价">
<span> <span>
100元/吨 {{detailList?.goodsInfoVO?.freightPrice}} {{detailList?.goodsInfoVO?.freightType}}
100元/方 </span>
100元/车</span>
</sv> </sv>
<sv label="结算依据"> <sv label="结算依据">
<div style="display: flex; justify-content: space-between;"> <div>
<div>以发货为准 / 以收货为准</div> <div *ngIf="detailList?.goodsInfoVO?.settlementBasis === '1'">以收货为准</div>
<div>保留小数/抹除小数/抹除个数</div> <div *ngIf="detailList?.goodsInfoVO?.settlementBasis === '2'">以发货为准 </div>
<div *ngIf="detailList?.goodsInfoVO?.rule === '1'">保留小数 </div>
<div *ngIf="detailList?.goodsInfoVO?.rule === '2'">抹除小数 </div>
<div *ngIf="detailList?.goodsInfoVO?.rule === '3'">抹除个数 </div>
</div> </div>
</sv> </sv>
</sv-container> </sv-container>
<sv-container col="2"> <sv-container col="2">
<sv label="装货重量"> <sv label="装货重量">
<div>xx</div> <div>{{detailList?.goodsInfoVO?.weight}}</div>
</sv> </sv>
<sv label="装货体积"> <sv label="装货体积">
<div>xx</div> <div>{{detailList?.goodsInfoVO?.volume}}</div>
</sv> </sv>
</sv-container> </sv-container>
<sv-container col="2"> <sv-container col="2">
<sv label="卸货重量"> <sv label="卸货重量">
<div>xx</div> <div>{{detailList?.goodsInfoVO?.volume}}</div>
</sv> </sv>
<sv label="卸货体积"> <sv label="卸货体积">
<div>xx吨</div> <div>xx吨</div>
@ -45,13 +47,13 @@ nzMessage="签收后不可再修改运费,请确保运费等信息准确无误
</sv-container> </sv-container>
<sv-container col="1"> <sv-container col="1">
<sv label="总运费"> <sv label="总运费">
<div>1000元 </div> <div>{{detailList?.goodsInfoVO?.freightPrice ? detailList?.goodsInfoVO?.freightPrice + '元' : ''}} </div>
</sv> </sv>
<sv label="司机车辆"> <sv label="司机车辆">
<div>张三 / 18888888888 / 粤GJ401</div> <div>{{driverList?.nickName}} / {{driverList?.telephone}}/ {{carList?.carNo}}</div>
</sv> </sv>
<sv label="收款人"> <sv label="收款人">
<div>李四 / 1888888888</div> <div>{{payeeList?.nickName}} / {{payeeList?.telephone}}</div>
</sv> </sv>
<sv label="回单凭证"> <sv label="回单凭证">
<!-- <app-imagelist <!-- <app-imagelist

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-14 15:43:12 * @LastEditTime: 2021-12-21 13:43:08
* @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
@ -21,6 +21,7 @@ import {
import { _HttpClient } from '@delon/theme'; 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';
@Component({ @Component({
selector: 'app-order-management-confir-receipt', selector: 'app-order-management-confir-receipt',
@ -28,21 +29,52 @@ import { NzModalRef } from 'ng-zorro-antd/modal';
styleUrls: ['./confir-receipt.component.less'] styleUrls: ['./confir-receipt.component.less']
}) })
export class ConfirReceiptComponent implements OnInit { export class ConfirReceiptComponent implements OnInit {
record: any = {};
i:any; i:any;
Status:any;
detailList:any;
data: any = {}; data: any = {};
constructor(private modal: NzModalRef, private msgSrv: NzMessageService, public http: _HttpClient) {} driverList: any;
payeeList: any;
carList: any;
constructor(private modal: NzModalRef, private msgSrv: NzMessageService, public http: _HttpClient, public service: OrderManagementService) {}
ngOnInit(): void { ngOnInit(): void {
this.initData()
} }
save(): void { save(): void {
// this.http.post(`/user/${this.record.id}`, value).subscribe(res => { // 大宗
// this.msgSrv.success('保存成功'); this.service.request(this.service.$api_get_signBulkOrder, {id: this.i?.id}).subscribe((res: any) => {
// this.modal.close(true); console.log(res.success)
// }); if(res) {
this.service.msgSrv.success('确认签收成功!')
} else {
this.service.msgSrv.error(res.msg)
}
})
} }
initData() {
// 大宗
this.service.request(this.service.$api_get_getBulkSignForDetail, {id: this.i?.id}).subscribe((res: any) => {
console.log(res)
this.detailList = res;
this.service.request(this.service.$api_getUserDetailByAppUserId, {id: this.detailList?.payeeId}).subscribe((res: any) => {
console.log(res)
this.payeeList = res;
})
this.service.request(this.service.$api_getUserDetailByAppUserId, {id: this.detailList?.driverId}).subscribe((res: any) => {
console.log(res)
this.driverList = res;
})
this.service.request(this.service.$api_getCarLicenseByIds, {id: this.detailList?.carId}).subscribe((res: any) => {
console.log(res)
this.carList = res;
})
})
}
close(): void { close(): void {
this.modal.destroy(); this.modal.destroy();
} }

View File

@ -1,53 +1,17 @@
<!-- <!--
* @Author: your name * @Author: your name
* @Date: 2021-12-14 14:03:07 * @Date: 2021-12-14 14:03:07
* @LastEditTime: 2021-12-14 15:16:40 * @LastEditTime: 2021-12-21 15:03:17
* @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\bulk\update-freight\update-freight.component.html * @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]="{ '*': { spanLabelFixed: 90, grid: { span:24 } } }" [button]="'none'">
<sf #sf [schema]="schema" [ui]="ui" [compact]="true" [button]="'none'">
<ng-template sf-template="no" let-me let-ui="ui" let-schema="schema">
<div style="display: flex;">
<nz-input-number [(ngModel)]="data.place" [nzMin]="1" [nzMax]="10" [nzStep]="1"></nz-input-number>
<div class="left_btn">元/吨</div>
</div>
</ng-template>
<ng-template sf-template="no2" let-me let-ui="ui" let-schema="schema">
<div style="display: flex;">
<nz-input-number [(ngModel)]="data.place1" [nzMin]="1" [nzMax]="10" [nzStep]="1"></nz-input-number>
<div class="left_btn"></div>
</div>
</ng-template>
<ng-template sf-template="no3" let-me let-ui="ui" let-schema="schema">
<div style="display: flex;">
<nz-input-number [(ngModel)]="data.place2" [nzMin]="1" [nzMax]="10" [nzStep]="1"></nz-input-number>
<div class="left_btn"></div>
</div>
</ng-template>
<ng-template sf-template="no4" let-me let-ui="ui" let-schema="schema">
<div style="display: flex;">
<nz-input-number [(ngModel)]="data.place3" [nzMin]="1" [nzMax]="10" [nzStep]="1"></nz-input-number>
<div class="left_btn"></div>
</div>
</ng-template>
<ng-template sf-template="no5" let-me let-ui="ui" let-schema="schema">
<div style="display: flex;">
<nz-input-number [(ngModel)]="data.place4" [nzMin]="1" [nzMax]="10" [nzStep]="1"></nz-input-number>
<div class="left_btn"></div>
</div>
</ng-template>
</sf> </sf>
<nz-divider></nz-divider> <nz-divider style="margin-top: 0;"></nz-divider>
<div> <div>
<p style="font-weight: bolder;">总运费:<span style="color: red;">¥900.00</span></p> <p style="font-size: 16px;">
<p>运输费¥800.00附加费¥100.00</p> <span style="font-weight: bolder">总运费:<span style="color: #dc112a">¥{{ data.totalFreight }}</span></span>
</div> </p>
<p style="margin-bottom: 0;"> 运输费:¥{{ data.freight }},附加费:¥{{ data.surcharge }}</p>
<div class="modal-footer">
<button nz-button type="button" (click)="close()">关闭</button>
<button nz-button type="submit" nzType="primary" (click)="save(sf.value)" [disabled]="!sf.valid" [nzLoading]="http.loading"
>确认</button
>
</div> </div>

View File

@ -1,4 +1,3 @@
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
@ -7,20 +6,12 @@ import { preloaderFinished } from '@delon/theme';
* @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
*/ */
import { Component, OnInit, ViewChild } from '@angular/core'; import { Component, Input, OnInit, ViewChild } from '@angular/core';
import { import {
SFComponent, SFComponent, SFNumberWidgetSchema, SFSchema,
SFCustomWidgetSchema,
SFNumberWidgetSchema,
SFRadioWidgetSchema,
SFSchema,
SFSelectWidgetSchema, SFSelectWidgetSchema,
SFTextareaWidgetSchema, SFStringWidgetSchema, SFTextWidgetSchema
SFUISchema
} from '@delon/form'; } from '@delon/form';
import { _HttpClient } from '@delon/theme';
import { NzMessageService } from 'ng-zorro-antd/message';
import { NzModalRef } from 'ng-zorro-antd/modal';
@Component({ @Component({
selector: 'app-order-management-update-freight', selector: 'app-order-management-update-freight',
@ -28,116 +19,154 @@ import { NzModalRef } from 'ng-zorro-antd/modal';
styleUrls: ['./update-freight.component.less'] styleUrls: ['./update-freight.component.less']
}) })
export class UpdateFreightComponent implements OnInit { export class UpdateFreightComponent implements OnInit {
record: any = {};
i: any;
@ViewChild('sf', { static: false }) sf!: SFComponent; @ViewChild('sf', { static: false }) sf!: SFComponent;
schema: SFSchema = {}; schema!: SFSchema;
ui: SFUISchema = {};
data: any = {}; @Input()
constructor(private modal: NzModalRef, private msgSrv: NzMessageService, public http: _HttpClient) {} data: any;
constructor() {}
ngOnInit(): void { ngOnInit(): void {
this.initSF(); this.schema = this.initSF(this.data);
if (this.record.id > 0) this.http.get(`/user/${this.record.id}`).subscribe(res => (this.i = res));
}
initSF() {
this.schema= {
properties: {
no: {
type: 'string',
title: '运费单价',
ui: {
widget: 'custom',
}
},
sex: {
title: '',
type: 'string',
enum: [
{ label: '保留小数', value: 0 },
{ label: '男', value: 1 },
{ label: '女', value: 2 },
{ label: '保密', value: 3 },
],
ui: {
widget: 'select',
} as SFSelectWidgetSchema,
},
appId: {
type: 'string',
title: '结算依据',
ui: {
width: 300,
grid: { span: 24 },
widget: 'select',
placeholder: '请选择',
allowClear: true,
// asyncData: () => this.getCatalogueMember(),
},
},
no2: {
type: 'string',
title: '装货重量',
ui: {
widget: 'custom',
}
},
no3: {
type: 'string',
title: '装货体积',
ui: {
widget: 'custom',
}
},
no4: {
type: 'string',
title: '卸货重量',
ui: {
widget: 'custom',
}
},
no5: {
type: 'string',
title: '卸货体积',
ui: {
widget: 'custom',
}
},
name3: {
type: 'string',
title: '变更原因',
maxLength: 100,
ui: {
width: 300,
placeholder:"选填最多不超过100字",
widget: 'textarea',
autosize: { minRows: 3, maxRows: 6 }
} as SFTextareaWidgetSchema
},
},
required: ['no', 'appId'],
type: 'object',
};
this.ui = { '*': { spanLabelFixed: 100, grid: { span: 12, gutter: 4 } }
};
}
save(value: any): void {
console.log(value)
console.log(this.data)
this.http.post(`/user/${this.record.id}`, value).subscribe(res => {
this.msgSrv.success('保存成功');
this.modal.close(true);
});
} }
close(): void {
this.modal.destroy();
}
/** /**
* 更新数字框 * 初始化表单
* @param value
* @param type
*/ */
changeNumVal(value: any, type: number) {} private initSF(data: any): SFSchema {
return {
properties: {
dto: {
type: 'object',
properties: {
freightPrice: {
type: 'string',
title: '运费单价',
ui: {
addOnAfter: data.freightTypeLabel,
placeholder: '请输入',
grid: {
span: 12
}
} as SFStringWidgetSchema,
default: data.freightPrice
},
rule: {
title: '',
type: 'string',
default: data.rule,
enum: [
{ label: '保留小数', value: '1' },
{ label: '抹除小数', value: '2' },
{ label: '抹除个数', value: '3' }
],
ui: {
widget: 'select',
spanLabelFixed: 10,
grid: {
span: 10
}
} as SFSelectWidgetSchema
},
settlementBasis: {
title: '结算依据',
type: 'string',
default: data.settlementBasis,
enum: [
{ label: '以收货为准', value: '1' },
{ label: '以发货为准', value: '2' }
],
ui: {
widget: 'select',
grid: {
span: 12
}
} as SFSelectWidgetSchema
},
blank1: {
title: '',
type: 'string',
ui: { widget: 'text', grid: { span: 12 }, class: 'input-back' },
default: ' '
},
freightType: {
title: '',
type: 'string',
ui: { hidden: true },
default: data.freightType
},
acceptWeight: {
type: 'number',
title: '装货重量',
default: data.acceptWeight,
ui: {
unit: '吨',
placeholder: '请输入',
grid: {
span: 12
},
hideStep: true
} as SFNumberWidgetSchema
},
acceptVolume: {
type: 'number',
title: '装货体积',
default: data.acceptVolume,
ui: {
unit: '吨',
placeholder: '请输入',
grid: {
span: 12
},
hideStep: true
} as SFNumberWidgetSchema
},
settlementWeight: {
type: 'number',
title: '卸货重量',
default: data.settlementWeight,
ui: {
unit: '吨',
placeholder: '请输入',
grid: {
span: 12
},
hideStep: true
} as SFNumberWidgetSchema
},
settlementVolume: {
type: 'number',
title: '卸货体积',
default: data.settlementVolume,
ui: {
unit: '吨',
placeholder: '请输入',
grid: {
span: 12
},
hideStep: true
} as SFNumberWidgetSchema
}
},
required: ['freightPrice', 'settlementBasis']
},
changeCause: {
title: '审核备注',
type: 'string',
maxLength: 100,
default: data.changeCause,
ui: {
widget: 'textarea',
span: 24,
placeholder: '选填最多不超过100字',
autosize: {
minRows: 3,
maxRows: 5
}
} as SFTextWidgetSchema
}
}
};
}
} }

View File

@ -0,0 +1,7 @@
<nz-spin *ngIf="!i" class="modal-spin"></nz-spin>
<sf #sf mode="edit" [schema]="schema" [ui]="ui" button="none"></sf>
<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">确定</button>
</div>

View File

@ -0,0 +1,93 @@
/*
* @Author: your name
* @Date: 2021-12-21 10:14:52
* @LastEditTime: 2021-12-21 10:17: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\vehicle\cancel\cancel.component.ts
*/
import { Component, OnInit, ViewChild } from '@angular/core';
import {
SFComponent,
SFCustomWidgetSchema,
SFNumberWidgetSchema,
SFRadioWidgetSchema,
SFSchema,
SFTextareaWidgetSchema,
SFUISchema
} from '@delon/form';
import { _HttpClient } from '@delon/theme';
import { NzMessageService } from 'ng-zorro-antd/message';
import { NzModalRef, NzModalService } from 'ng-zorro-antd/modal';
import { OrderManagementService } from '../../../services/order-management.service';
@Component({
selector: 'app-order-management-cancel',
templateUrl: './cancel.component.html'
})
export class OneCarOrderCancelComponent implements OnInit {
record: any = {};
i: any;
@ViewChild('sf', { static: false }) sf!: SFComponent;
schema: SFSchema = {};
ui: SFUISchema = {};
constructor(private modalRef: NzModalRef, private modal: NzModalService, public service: OrderManagementService) {}
ngOnInit(): void {
this.initSF();
console.log(this.i.billStatusLabel)
}
initSF() {
this.schema = {
properties: {
cancelReason: {
type: 'string',
title: '取消原因',
ui: {
widget: 'textarea',
autosize: { minRows: 3, maxRows: 6 }
} as SFTextareaWidgetSchema
}
},
required: ['reason']
};
this.ui = {
'*': {
spanLabelFixed: 100,
grid: { span: 20 }
}
};
}
save(value: any): void {
if (this.i?.billStatus === '1') {
// 待接单状态
this.modal.confirm({
nzTitle: '<i>是否确定立即取消运单!</i>',
nzOnOk: () =>
this.service.request(this.service.$api_get_cancelAnOrder, { id: this.i?.id, ...this.sf.value }).subscribe(res => {
if (res) {
this.modalRef.close(true);
} else {
this.service.msgSrv.error(res.msg);
}
}),
nzOnCancel: () => this.modalRef.destroy()
});
} else {
this.service.request(this.service.$api_get_cancelAnOrder, { id: this.i?.id, ...this.sf.value }).subscribe(res => {
if (res) {
this.modalRef.close(true);
} else {
this.service.msgSrv.error(res.msg);
}
});
}
this.modalRef.close(true);
}
close(): void {
this.modalRef.destroy();
}
}

View File

@ -1,67 +1,53 @@
<!-- <!--
* @Author: your name * @Author: your name
* @Date: 2021-12-14 14:03:07 * @Date: 2021-12-15 13:17:42
* @LastEditTime: 2021-12-14 15:43:01 * @LastEditTime: 2021-12-21 14:34:16
* @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.html * @FilePath: \tms-obc-web\src\app\routes\order-management\modal\vehicle\confir-receipt\confir-receipt.component.html
--> -->
<nz-alert <nz-alert
style="padding-bottom: 15px;" style="padding-bottom: 15px"
nzType="warning" nzType="warning"
nzCloseable nzCloseable
nzMessage="签收后不可再修改运费,请确保运费等信息准确无误后,再进行签收。" nzMessage="签收后不可再修改运费,请确保运费等信息准确无误后,再进行签收。"
></nz-alert> ></nz-alert>
<sv-container col="1">
<sv label="货物单价">
<span>
100元/吨
100元/方
100元/车</span>
</sv>
<sv label="结算依据">
<div style="display: flex; justify-content: space-between;">
<div>以发货为准 / 以收货为准</div>
<div>保留小数/抹除小数/抹除个数</div>
</div>
</sv>
</sv-container> <sv-container col="1">
<sv-container col="2"> <sv label="费用明细">
<sv label="装货重量"> <st #st [widthMode]="{ type: 'strict' }" [data]="costDetail" [columns]="columns" bordered="true" [page]="{ show: false }"></st>
<div>xx吨</div>
</sv>
<sv label="装货体积">
<div>xx吨</div>
</sv>
</sv-container>
<sv-container col="2">
<sv label="卸货重量">
<div>xx吨</div>
</sv>
<sv label="卸货体积">
<div>xx吨</div>
</sv>
</sv-container>
<sv-container col="1">
<sv label="总运费">
<div>1000元 </div>
</sv> </sv>
<sv label="司机车辆"> <sv label="司机车辆">
<div>张三 / 18888888888 / 粤GJ401</div> <div>{{driverList?.nickName}} / {{driverList?.telephone}}/ {{carList?.carNo}}</div>
</sv> </sv>
<sv label="收款人"> <sv label="收款人">
<div>李四 / 1888888888</div> <div>{{payeeList?.nickName}} / {{payeeList?.telephone}}</div>
</sv> </sv>
<sv label="回单凭证"> <sv label="回单凭证">
<!-- <app-imagelist <nz-upload
[imgList]="[userIdentityDetail?.certificatePhotoFrontWatermark,userIdentityDetail?.certificatePhotoBackWatermark]"> class="avatar-uploader"
</app-imagelist> --> [nzAction]="service.$api_upload_url"
[nzName]="'multipartFile'"
nzListType="picture-card"
[(nzFileList)]="listImagUrls"
[nzShowButton]="listImagUrls.length < 5"
[nzPreview]="handlePreview1"
[nzBeforeUpload]="beforeUpload"
(nzChange)="handleChange1($event)"
>
<div>
<i nz-icon nzType="plus"></i>
<div style="margin-top: 8px">请上传图片</div>
</div>
</nz-upload>
<nz-modal [nzVisible]="previewVisible1" [nzContent]="modalContent" [nzFooter]="null" (nzOnCancel)="previewVisible1 = false">
<ng-template #modalContent>
<img [src]="previewImage1" [ngStyle]="{ width: '100%' }" />
</ng-template>
</nz-modal>
</sv> </sv>
</sv-container> </sv-container>
<div class="modal-footer"> <div class="modal-footer">
<button nz-button type="button" (click)="close()">关闭</button> <button nz-button type="button" (click)="close()">关闭</button>
<button nz-button type="submit" nzType="primary" (click)="save()" [nzLoading]="http.loading" <button nz-button type="submit" nzType="primary" (click)="save()" [nzLoading]="http.loading">确认签收</button>
>确认签收</button
>
</div> </div>

View File

@ -1,12 +1,12 @@
import { preloaderFinished } from '@delon/theme';
/* /*
* @Author: your name * @Author: your name
* @Date: 2021-12-14 14:03:07 * @Date: 2021-12-15 13:17:42
* @LastEditTime: 2021-12-15 14:08:34 * @LastEditTime: 2021-12-21 14:50:54
* @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\vehicle\confir-receipt\confir-receipt.component.ts
*/ */
import { Component, OnInit, ViewChild } from '@angular/core'; import { Component, OnInit, ViewChild } from '@angular/core';
import { import {
SFComponent, SFComponent,
@ -18,10 +18,21 @@ import {
SFTextareaWidgetSchema, SFTextareaWidgetSchema,
SFUISchema SFUISchema
} from '@delon/form'; } from '@delon/form';
import { NzUploadChangeParam, NzUploadFile } from 'ng-zorro-antd/upload';
import { _HttpClient } from '@delon/theme'; 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 { Observable, Observer } from 'rxjs';
import { STColumn } from '@delon/abc/st';
function getBase64(file: File): Promise<string | ArrayBuffer | null> {
return new Promise((resolve, reject) => {
const reader = new FileReader();
reader.readAsDataURL(file);
reader.onload = () => resolve(reader.result);
reader.onerror = error => reject(error);
});
}
@Component({ @Component({
selector: 'app-order-management-vehicle-confir-receipt', selector: 'app-order-management-vehicle-confir-receipt',
templateUrl: './confir-receipt.component.html', templateUrl: './confir-receipt.component.html',
@ -30,24 +41,155 @@ import { NzModalRef } from 'ng-zorro-antd/modal';
export class VehicleConfirReceiptComponent implements OnInit { export class VehicleConfirReceiptComponent implements OnInit {
record: any = {}; record: any = {};
i:any; i:any;
Status: any
costDetail: any // 费用明细
columns!: STColumn[];
previewVisible1 = false;
dataInfo: any;
detailList: any
data: any = {}; data: any = {};
constructor(private modal: NzModalRef, private msgSrv: NzMessageService, public http: _HttpClient) {} previewImage1 = '';
listImagUrls: any[] = [];
payeeList: any;
driverList: any;
carList: any;
constructor(private modal: NzModalRef, private msgSrv: NzMessageService, public http: _HttpClient,public service: OrderManagementService) {}
ngOnInit(): void { ngOnInit(): void {
this.initST()
this.initData()
} }
save(): void { save(): void {
// this.http.post(`/user/${this.record.id}`, value).subscribe(res => { this.service.request(this.service.$api_get_signWholeOrder, {id: this.i?.id}).subscribe((res: any) => {
// this.msgSrv.success('保存成功'); console.log(res)
// this.modal.close(true); if(res) {
// }); this.service.msgSrv.success('确认签收成功!')
} else {
this.service.msgSrv.error(res.msg)
}
})
} }
handlePreview1 = async (file: NzUploadFile) => {
if (!file.url && !file.preview) {
file.preview = await getBase64(file.originFileObj!);
}
this.previewImage1 = file.url || file.preview;
this.previewVisible1 = true;
};
close(): void { close(): void {
this.modal.destroy(); this.modal.destroy();
} }
userAction() {
beforeUpload = (file: NzUploadFile, _fileList: NzUploadFile[]) => {
return new Observable((observer: Observer<boolean>) => {
const isJpgOrPng = file.type === 'image/jpeg' || file.type === 'image/png' || file.type === 'image/gif' || file.type === 'image/bmp';
if (!isJpgOrPng) {
this.service.msgSrv.warning('只能上传图片!');
observer.complete();
return;
}
// tslint:disable-next-line: no-non-null-assertion
const isLt2M = file.size! / 1024 / 1024 < 3;
if (!isLt2M) {
this.service.msgSrv.warning('图片大小超过3兆!');
observer.complete();
return;
}
observer.next(isJpgOrPng && isLt2M);
observer.complete();
});
};
initData() {
// if (this.i?.receiptCertificate?.length > 0) {
// this.i?.receiptCertificate.forEach((element: any) => {
// const image = {
// url: element,
// status: 'done',
// uid: '-1'
// };
// this.listImagUrls.push(image);
// });
// }
// 大宗
this.service.request(this.service.$api_get_getWholeSignForDetail, {id: this.i?.id}).subscribe((res: any) => {
console.log(res)
this.dataInfo = res;
const cost: any = {}
res.mybidDetailInfo.forEach((element: any) => {
if(element.expenseName === "预付" || element.expenseCode === 'PRE') {
cost.PRE = element.price
} else if(element.expenseName === "到付" || element.expenseCode === 'RECE') {
cost.RECE = element.price
} else if(element.expenseName === "回单付" || element.expenseCode === 'BACK') {
cost.BACK = element.price
} else if(element.expenseName === "油卡" || element.expenseCode === 'OIL') {
cost.OIL = element.price
} else if(element.expenseName === "总费用") {
cost.traiPrice = element.price
}
});
this.service.request(this.service.$api_getUserDetailByAppUserId, {id: this.dataInfo?.payeeId}).subscribe((res: any) => {
console.log(res)
this.payeeList = res;
})
this.service.request(this.service.$api_getUserDetailByAppUserId, {id: this.dataInfo?.driverId}).subscribe((res: any) => {
console.log(res)
this.driverList = res;
})
this.service.request(this.service.$api_getCarLicenseByIds, {id: this.dataInfo?.carId}).subscribe((res: any) => {
console.log(res)
this.carList = res;
})
console.log(cost)
this.costDetail = [cost];
})
}
initST() {
this.columns = [
{
title: '预付',
index: 'PRE'
},
{
title: '到付',
index: 'RECE'
},
{
title: '油卡',
index: 'OIL'
},
{
title: '回单付',
index: 'BACK'
},
{
title: '总运费',
index: 'traiPrice'
}
];
}
handleChange1(info: NzUploadChangeParam): void {
switch (info.file.status) {
case 'uploading':
break;
case 'done':
const resData = info.file.response.data;
const arr = [
{
url: resData.fullFilePath,
status: 'done',
uid: '-1'
}
];
this.listImagUrls = arr;
break;
case 'error':
this.service.msgSrv.error('网络错误');
break;
}
} }
} }

View File

@ -1,21 +1,21 @@
<!-- <!--
* @Author: your name * @Author: your name
* @Date: 2021-12-14 15:53:03 * @Date: 2021-12-14 15:53:03
* @LastEditTime: 2021-12-14 17:39:33 * @LastEditTime: 2021-12-20 19:53:23
* @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\sure-depart\sure-depart.component.html * @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"> <sf #sf mode="edit" [schema]="schema" [ui]="ui" [formData]="formData" 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;"> <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]="10" [nzStep]="1"></nz-input-number>
<div class="left_btn"></div> <div class="left_btn"></div>
</div> </div>
</ng-template> </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;"> <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]="10" [nzStep]="1"></nz-input-number>
<div class="left_btn"></div> <div class="left_btn"></div>
</div> </div>
</ng-template> </ng-template>

View File

@ -1,13 +1,6 @@
import { preloaderFinished } from '@delon/theme';
/*
* @Author: your name
* @Date: 2021-12-14 14:03:07
* @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
*/
import { Component, OnInit, ViewChild } from '@angular/core'; import { Component, OnInit, ViewChild } from '@angular/core';
import { DatePipe } from '@angular/common';
import { import {
SFComponent, SFComponent,
SFCustomWidgetSchema, SFCustomWidgetSchema,
@ -20,151 +13,127 @@ import {
SFUISchema, SFUISchema,
SFUploadWidgetSchema SFUploadWidgetSchema
} from '@delon/form'; } from '@delon/form';
import { apiConf } from '@conf/api.conf';
import { _HttpClient } from '@delon/theme'; 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 { SupplyManagementService } from 'src/app/routes/supply-management/services/supply-management.service'; import { WaybillManagementServe } from 'src/app/routes/waybill-management/services/waybill-management.service';
import { Observable, Observer } from 'rxjs'; import { Observable, Observer } from 'rxjs';
import { EAEnvironmentService } from '@shared';
@Component({ @Component({
selector: 'app-order-management-vehicle-sure-arrive', selector: 'app-order-management-vehicle-sure-arrive',
templateUrl: './sure-arrive.component.html', templateUrl: './sure-arrive.component.html',
styleUrls: ['./sure-arrive.component.less'] styleUrls: ['./sure-arrive.component.less'],
providers: [DatePipe]
}) })
export class VehicleSureArriveComponent implements OnInit { export class VehicleSureArriveComponent implements OnInit {
record: any = {}; record: any = {};
i: any; i: any;
formData: any;
Status: any; Status: any;
data: any ={ data: any ={
place1: '', weight: 0,
place2: '' volume: 0
}; };
@ViewChild('sf', { static: false }) sf!: SFComponent; @ViewChild('sf', { static: false }) sf!: SFComponent;
schema: SFSchema = {}; schema: SFSchema = {};
ui: SFUISchema = {}; 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 datePipe: DatePipe,private envSrv: EAEnvironmentService, ) {}
ngOnInit(): void { ngOnInit(): void {
console.log(this.i)
this.initData()
this.i.time = this.i.loadingTime;
this.initSF(); this.initSF();
} }
initSF() { initSF() {
if(this.Status === 1) {
this.schema = { this.schema = {
properties: { properties: {
datetime: { time: {
type: 'string', type: 'string',
title: '卸货时间', title: '卸货时间',
format: 'date-time', format: 'date-time',
}, },
no2: { imgUrl3: {
type: 'string',
title: '卸货重量',
ui: {
widget: 'custom',
}
},
no3: {
type: 'string',
title: '卸货体积',
ui: {
widget: 'custom',
}
},
avatar: {
type: 'string', type: 'string',
title: '装货凭证', title: '装货凭证',
readOnly: true,
ui: { ui: {
action: `/scm/cms/cms/upload/multipartFile/fileModel`, widget: 'upload',
fileType: 'image/png,image/jpeg,image/jpg', action: apiConf.fileUpload,
fileType: 'image/png,image/jpeg,image/jpg,image/gif',
limit: 1, limit: 1,
limitFileCount: 1, limitFileCount: 1,
resReName: 'url', resReName: 'data.fullFileWatermarkPath',
urlReName: 'url', urlReName: 'data.fullFileWatermarkPath',
widget: 'upload', descriptionI18n: '提货单',
descriptionI18n: ' 提单号',
data: { data: {
// appId: environment.appId, appId: this.envSrv.env.appId,
}, },
name: 'multipartFile', name: 'multipartFile',
multiple: true, beforeUpload: (file: any, fileList: any) => {
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
}
}
];
this.sf?.setValue('/avatar', avatar);
}
},
beforeUpload: (file: any, _fileList: any) => {
return new Observable((observer: Observer<boolean>) => { return new Observable((observer: Observer<boolean>) => {
const isLt2M = file.size / 1024 / 1024 < 5; const isLt1M = file.size / 1024 / 1024 < 5;
if (!isLt2M) { 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!'); this.service.msgSrv.warning('图片大小超过5M!');
observer.complete(); observer.complete();
return; return;
} }
observer.next(isLt2M); observer.next(isLt1M);
observer.complete(); observer.complete();
}); });
} },
} as SFUploadWidgetSchema multiple: false,
listType: 'picture-card',
} as SFUploadWidgetSchema,
}, },
avatar2: { imgUrl4: {
type: 'string', type: 'string',
title: '', title: '',
readOnly: true,
ui: { ui: {
action: `/scm/cms/cms/upload/multipartFile/fileModel`, widget: 'upload',
fileType: 'image/png,image/jpeg,image/jpg', action: apiConf.fileUpload,
fileType: 'image/png,image/jpeg,image/jpg,image/gif',
limit: 1, limit: 1,
limitFileCount: 1, limitFileCount: 1,
resReName: 'url', resReName: 'data.fullFileWatermarkPath',
urlReName: 'url', urlReName: 'data.fullFileWatermarkPath',
widget: 'upload',
descriptionI18n: '人车货照片', descriptionI18n: '人车货照片',
data: { data: {
// appId: environment.appId, appId: this.envSrv.env.appId,
}, },
name: 'multipartFile', name: 'multipartFile',
multiple: true, beforeUpload: (file: any, fileList: any) => {
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
}
}
];
this.sf?.setValue('/avatar', avatar);
}
},
beforeUpload: (file: any, _fileList: any) => {
return new Observable((observer: Observer<boolean>) => { return new Observable((observer: Observer<boolean>) => {
const isLt2M = file.size / 1024 / 1024 < 5; const isLt1M = file.size / 1024 / 1024 < 5;
if (!isLt2M) { 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!'); this.service.msgSrv.warning('图片大小超过5M!');
observer.complete(); observer.complete();
return; return;
} }
observer.next(isLt2M); observer.next(isLt1M);
observer.complete(); observer.complete();
}); });
} },
} as SFUploadWidgetSchema multiple: false,
listType: 'picture-card',
} as SFUploadWidgetSchema,
}, },
no4: { no4: {
type: 'string', type: 'string',
@ -174,124 +143,365 @@ export class VehicleSureArriveComponent implements OnInit {
}, },
default: '单张大小不超过5M支持.jpg、.jpeg和 .png格式', default: '单张大小不超过5M支持.jpg、.jpeg和 .png格式',
}, },
avatar3: { imgUrl1: {
type: 'string', type: 'string',
title: '卸货凭证', title: '卸货凭证',
ui: { ui: {
action: `/scm/cms/cms/upload/multipartFile/fileModel`, widget: 'upload',
fileType: 'image/png,image/jpeg,image/jpg', action: apiConf.fileUpload,
fileType: 'image/png,image/jpeg,image/jpg,image/gif',
limit: 1, limit: 1,
limitFileCount: 1, limitFileCount: 1,
resReName: 'url', resReName: 'data.fullFileWatermarkPath',
urlReName: 'url', urlReName: 'data.fullFileWatermarkPath',
widget: 'upload', descriptionI18n: '提货单',
descriptionI18n: ' 提单号',
data: { data: {
// appId: environment.appId, appId: this.envSrv.env.appId,
}, },
name: 'multipartFile', name: 'multipartFile',
multiple: true, beforeUpload: (file: any, fileList: any) => {
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
}
}
];
this.sf?.setValue('/avatar', avatar);
}
},
beforeUpload: (file: any, _fileList: any) => {
return new Observable((observer: Observer<boolean>) => { return new Observable((observer: Observer<boolean>) => {
const isLt2M = file.size / 1024 / 1024 < 5; const isLt1M = file.size / 1024 / 1024 < 5;
if (!isLt2M) { 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!'); this.service.msgSrv.warning('图片大小超过5M!');
observer.complete(); observer.complete();
return; return;
} }
observer.next(isLt2M); observer.next(isLt1M);
observer.complete(); observer.complete();
}); });
} },
} as SFUploadWidgetSchema multiple: false,
listType: 'picture-card',
} as SFUploadWidgetSchema,
}, },
avatar4: { imgUrl2: {
type: 'string', type: 'string',
title: '', title: '',
ui: { ui: {
action: `/scm/cms/cms/upload/multipartFile/fileModel`, widget: 'upload',
fileType: 'image/png,image/jpeg,image/jpg', action: apiConf.fileUpload,
fileType: 'image/png,image/jpeg,image/jpg,image/gif',
limit: 1, limit: 1,
limitFileCount: 1, limitFileCount: 1,
resReName: 'url', resReName: 'data.fullFileWatermarkPath',
urlReName: 'url', urlReName: 'data.fullFileWatermarkPath',
widget: 'upload',
descriptionI18n: '人车货照片', descriptionI18n: '人车货照片',
data: { data: {
// appId: environment.appId, appId: this.envSrv.env.appId,
}, },
name: 'multipartFile', name: 'multipartFile',
multiple: true, beforeUpload: (file: any, fileList: any) => {
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
}
}
];
this.sf?.setValue('/avatar', avatar);
}
},
beforeUpload: (file: any, _fileList: any) => {
return new Observable((observer: Observer<boolean>) => { return new Observable((observer: Observer<boolean>) => {
const isLt2M = file.size / 1024 / 1024 < 5; const isLt1M = file.size / 1024 / 1024 < 5;
if (!isLt2M) { 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!'); this.service.msgSrv.warning('图片大小超过5M!');
observer.complete(); observer.complete();
return; return;
} }
observer.next(isLt2M); observer.next(isLt1M);
observer.complete(); observer.complete();
}); });
} },
} as SFUploadWidgetSchema multiple: false,
listType: 'picture-card',
} as SFUploadWidgetSchema,
} }
}, },
required: ['reason'] required: ['time']
}; };
}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',
}
},
imgUrl3: {
type: 'string',
title: '装货凭证',
readOnly: true,
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',
} as SFUploadWidgetSchema,
},
imgUrl4: {
type: 'string',
title: '',
readOnly: true,
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',
} as SFUploadWidgetSchema,
},
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',
} 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',
} as SFUploadWidgetSchema,
}
},
required: ['time', 'weight' ]
};
}
this.ui = { this.ui = {
'*': { '*': {
spanLabelFixed: 100, spanLabelFixed: 100,
grid: { span: 20 } grid: { span: 20 }
}, },
$avatar: { grid: { span: 12} }, $imgUrl1: { grid: { span: 12} },
$avatar2: { grid: { span: 12} }, $imgUrl2: { grid: { span: 12} },
$avatar3: { grid: { span: 12} }, $imgUrl3: { grid: { span: 12} },
$avatar4: { grid: { span: 12} }, $imgUrl4: { grid: { span: 12} },
}; };
} }
save(value: any): void { save(value: any): void {
console.log(value) if(this.Status === 1) {
// this.http.post(`/user/${this.record.id}`, value).subscribe(res => { if(!value.time) {
// this.msgSrv.success('保存成功'); this.service.msgSrv.warning('必填项为空!')
// this.modal.close(true); return;
// }); }
} const params = {
id: this.i.id,
imgUrl1: value.imgUrl1.data.fullFilePath,
imgUrl2: value.imgUrl2.data.fullFilePath,
time: value.time,
}
params.time = this.datePipe.transform(value.time, 'yyyy-MM-dd HH:mm:ss ')
this.service.request(this.service.$api_get_insertWholeUnloadCarInfo, params).subscribe((res) => {
if(res) {
this.service.msgSrv.success('确认到车成功!')
this.modal.destroy();
} else{
this.service.msgSrv.error(res.msg)
}
})
} else {
if(!value.time || !this.data.weight) {
this.service.msgSrv.warning('必填项为空!')
return;
}
console.log(value)
console.log(this.i)
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
}
params.time = this.datePipe.transform(value.time, 'yyyy-MM-dd HH:mm:ss ')
console.log(params)
this.service.request(this.service.$api_get_insertBulkUnloadCarInfo, params).subscribe((res) => {
if(res) {
this.service.msgSrv.success('确认到车成功!')
this.modal.destroy();
} else{
this.service.msgSrv.error(res.msg)
}
})
}
}
// 确认到车界面信息(两个只能看的图片)
initData() {
this.service.request(this.service.$api_get_getUnloadCarInfo, { id : this.i?.id}).subscribe((res) => {
console.log(res)
if (res.imgUrl1) {
this.formData = {
imgUrl3: [
{
uid: 'logo',
name: 'LOGO',
status: 'done',
url: res.imgUrl1,
response: {
url: res.imgUrl1,
},
},
],
imgUrl4: [
{
uid: 'logo',
name: 'LOGO',
status: 'done',
url: res.imgUrl2,
response: {
url: res.imgUrl2,
},
},
],
};
}
})
}
close(): void { close(): void {
this.modal.destroy(); this.modal.destroy();
} }

View File

@ -1,7 +1,7 @@
<!-- <!--
* @Author: your name * @Author: your name
* @Date: 2021-12-14 15:53:03 * @Date: 2021-12-14 15:53:03
* @LastEditTime: 2021-12-20 16:28:39 * @LastEditTime: 2021-12-20 19:03:53
* @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\sure-depart\sure-depart.component.html * @FilePath: \tms-obc-web\src\app\routes\order-management\modal\bulk\sure-depart\sure-depart.component.html

View File

@ -1,12 +1,4 @@
import { preloaderFinished } from '@delon/theme';
/*
* @Author: your name
* @Date: 2021-12-14 14:03:07
* @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
*/
import { Component, OnInit, ViewChild } from '@angular/core'; import { Component, OnInit, ViewChild } from '@angular/core';
import { import {
SFComponent, SFComponent,
@ -27,11 +19,13 @@ import { NzModalRef } from 'ng-zorro-antd/modal';
import { Observable, Observer } from 'rxjs'; import { Observable, Observer } from 'rxjs';
import { WaybillManagementServe } from 'src/app/routes/waybill-management/services/waybill-management.service'; import { WaybillManagementServe } from 'src/app/routes/waybill-management/services/waybill-management.service';
import { EAEnvironmentService, EADateUtil } from '@shared'; import { EAEnvironmentService, EADateUtil } from '@shared';
import { DatePipe } from '@angular/common';
@Component({ @Component({
selector: 'app-order-management-vehicle-sure-depart', selector: 'app-order-management-vehicle-sure-depart',
templateUrl: './sure-depart.component.html', templateUrl: './sure-depart.component.html',
styleUrls: ['./sure-depart.component.less'] styleUrls: ['./sure-depart.component.less'],
providers: [DatePipe]
}) })
export class VehicleSureDepartComponent implements OnInit { export class VehicleSureDepartComponent implements OnInit {
record: any = {}; record: any = {};
@ -44,24 +38,31 @@ export class VehicleSureDepartComponent implements OnInit {
@ViewChild('sf', { static: false }) sf!: SFComponent; @ViewChild('sf', { static: false }) sf!: SFComponent;
schema: SFSchema = {}; schema: SFSchema = {};
ui: SFUISchema = {}; ui: SFUISchema = {};
constructor(private modal: NzModalRef, private msgSrv: NzMessageService, public http: _HttpClient, public service: WaybillManagementServe, private envSrv: EAEnvironmentService,) {} constructor(private modal: NzModalRef, private msgSrv: NzMessageService, public http: _HttpClient, public service: WaybillManagementServe, private envSrv: EAEnvironmentService,private datePipe: DatePipe) {}
ngOnInit(): void { ngOnInit(): void {
this.initSF(); this.initSF();
console.log(this.i) console.log(this.i)
this.data.weight = this.i?.weight this.data.weight = this.i?.weight
this.i.time = this.i.loadingTime; this.i.time = this.i.loadingTime;
console.log(this.Status)
} }
initSF() { initSF() {
if(this.Status === 1) { if(this.Status === 1) {
this.schema = { this.schema = {
properties: { properties: {
datetime: { time: {
type: 'string', type: 'string',
title: '装货时间', title: '装货时间',
format: 'date-time', format: 'date-time',
}, },
no4: {
type: 'string',
title: '',
ui: {
widget: 'text',
},
default: '单张大小不超过5M支持.jpg、.jpeg和 .png格式',
},
imgUrl1: { imgUrl1: {
type: 'string', type: 'string',
title: '装货凭证', title: '装货凭证',
@ -252,7 +253,7 @@ export class VehicleSureDepartComponent implements OnInit {
} as SFUploadWidgetSchema, } as SFUploadWidgetSchema,
} }
}, },
required: ['reason'] required: ['time', 'weight']
}; };
} }
@ -266,27 +267,51 @@ export class VehicleSureDepartComponent implements OnInit {
}; };
} }
save(value: any): void { save(value: any): void {
if(this.Status === 1) {
console.log(value) if(!value.time) {
const params = { this.service.msgSrv.warning('必填项为空!')
id: this.i.id, return;
imgUrl1: value.imgUrl1.data.fullFilePath, }
imgUrl2: value.imgUrl2.data.fullFilePath, const params = {
time: value.time, id: this.i.id,
volume: this.data.volume, imgUrl1: value.imgUrl1.data.fullFilePath,
weight: this.data.weight imgUrl2: value.imgUrl2.data.fullFilePath,
time: value.time,
}
params.time = this.datePipe.transform(value.time, 'yyyy-MM-dd HH:mm:ss ')
this.service.request(this.service.$api_get_insertWholeStartCarInfo, params).subscribe((res) => {
if(res) {
this.service.msgSrv.success('确认发车成功!')
this.modal.destroy();
} else{
this.service.msgSrv.error(res.msg)
}
})
} else {
if(!value.time || !this.data.weight) {
this.service.msgSrv.warning('必填项为空!')
return;
}
console.log(value)
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
}
params.time = this.datePipe.transform(value.time, 'yyyy-MM-dd HH:mm:ss ')
this.service.request(this.service.$api_get_insertBulkStartCarInfo, params).subscribe((res) => {
if(res) {
this.service.msgSrv.success('确认发车成功!')
this.modal.destroy();
} else{
this.service.msgSrv.error(res.msg)
}
})
} }
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 { close(): void {

View File

@ -1,20 +1,11 @@
<!-- <sf #sf mode="edit" [schema]="schema" [ui]="ui" button="none"></sf>
* @Author: your name
* @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\vehicle\update-freight\update-freight.component.html
-->
<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> <nz-divider></nz-divider>
<div> <div>
<p> <p>
<span style="font-weight: bolder" <span style="font-weight: bolder"
>总运费:<span style="color: #dc112a">¥{{ totalPrice }}</span></span >总运费:<span style="color: #dc112a">¥{{ data.totalFreight }}</span></span
> >
(运输费:¥{{ tranPrice }},附加费:¥{{ otherPrice }} (运输费:¥{{ data.freight }},附加费:¥{{ data.surcharge }}
</p> </p>
<p> <p>
<label nz-checkbox [(ngModel)]="aggreechecked">确认已阅读并知晓<a>《变更协议》</a></label> <label nz-checkbox [(ngModel)]="aggreechecked">确认已阅读并知晓<a>《变更协议》</a></label>

View File

@ -2,12 +2,12 @@ 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-20 15:57:37 * @LastEditTime: 2021-12-21 14:56:26
* @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
*/ */
import { Component, OnInit, ViewChild } from '@angular/core'; import { Component, Input, OnInit, ViewChild } from '@angular/core';
import { import {
SFComponent, SFComponent,
SFCustomWidgetSchema, SFCustomWidgetSchema,
@ -29,47 +29,33 @@ import { OrderManagementService } from '../../../services/order-management.servi
styleUrls: ['./update-freight.component.less'] styleUrls: ['./update-freight.component.less']
}) })
export class VehicleUpdateFreightComponent implements OnInit { export class VehicleUpdateFreightComponent implements OnInit {
record: any;
i: any;
@ViewChild('sf', { static: false }) sf!: SFComponent; @ViewChild('sf', { static: false }) sf!: SFComponent;
schema: SFSchema = {}; schema: SFSchema = {};
ui: SFUISchema = {}; ui: SFUISchema = {};
totalPrice = 0;
tranPrice = 0;
otherPrice = 0;
aggreechecked = false; aggreechecked = false;
@Input()
data: any;
constructor(private modal: NzModalRef, private msgSrv: NzMessageService, public service: OrderManagementService) {} constructor(private modal: NzModalRef, private msgSrv: NzMessageService, public service: OrderManagementService) {}
ngOnInit(): void { ngOnInit(): void {
this.i = { this.initSF(this.data);
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();
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() { initSF(data: any) {
const info = {
prePay: data.list?.filter((item: any) => item.costCode === 'PRE')[0],
toPay: data.list?.filter((item: any) => item.costCode === 'RECE')[0],
receiptPay: data.list?.filter((item: any) => item.costCode === 'BACK')[0]
};
this.schema = { this.schema = {
properties: { properties: {
prePay: { prePay: {
type: 'number', type: 'number',
title: '预付', title: '预付',
default: 0.0, default: info.prePay?.price || 0,
readOnly: this.i.prePayStatus !== '3', readOnly: info.prePay?.paymentStatus === '2' || info.prePay?.paymentStatus === '4',
ui: { ui: {
prefix: '¥', prefix: '¥',
widgetWidth: 200, widgetWidth: 200,
@ -80,8 +66,8 @@ export class VehicleUpdateFreightComponent implements OnInit {
toPay: { toPay: {
type: 'number', type: 'number',
title: '到付', title: '到付',
default: 0.0, default: info.toPay?.price || 0,
readOnly: this.i.toPayStatus !== '3', readOnly: info.toPay?.paymentStatus === '2' || info.toPay?.paymentStatus === '4',
ui: { ui: {
prefix: '¥', prefix: '¥',
widgetWidth: 200, widgetWidth: 200,
@ -104,8 +90,8 @@ export class VehicleUpdateFreightComponent implements OnInit {
receiptPay: { receiptPay: {
type: 'number', type: 'number',
title: '回单付', title: '回单付',
default: 0.0, default: info.receiptPay?.price || 0,
readOnly: this.i.receiptPayStatus !== '3', readOnly: info.receiptPay?.paymentStatus === '2' || info.receiptPay?.paymentStatus === '4',
ui: { ui: {
prefix: '¥', prefix: '¥',
widgetWidth: 200, widgetWidth: 200,
@ -132,10 +118,11 @@ export class VehicleUpdateFreightComponent implements OnInit {
} }
}; };
} }
save(value: any): void { save(value: any): void {
const editItems = this.record?.mybidDetailInfo.filter((data: any) => data.receiptPayStatus === '3'); 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.expenseName) { switch (item.costName) {
case '预付': case '预付':
item.price = this.sf.value.prePay; item.price = this.sf.value.prePay;
break; break;
@ -151,18 +138,17 @@ export class VehicleUpdateFreightComponent implements OnInit {
}); });
const params = { const params = {
id: this.record?.id, billId: this.data.id,
dtos: editItems, dtos: editItems,
changeCause: this.sf.value.changeCause changeCause: this.sf.value.changeCause
}; };
// this.service.request(this.service.$api_insertFreightChangeWhole, params).subscribe((res: any) => { this.service.request(this.service.$api_get_insertFreightChangeWhole, params).subscribe((res: any) => {
// if (res) { if (res) {
// this.modal.destroy(); this.modal.destroy();
// } else { this.service.msgSrv.success('变更运费成功');
// this.service.msgSrv.error(res.msg); }
// } });
// });
} }
close(): void { close(): void {
@ -173,7 +159,7 @@ export class VehicleUpdateFreightComponent implements OnInit {
* *
*/ */
changeNumVal() { changeNumVal() {
this.tranPrice = this.sf.value.prePay + this.sf.value.toPay + this.sf.value.oilCardPay + this.sf.value.receiptPay; // 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; // this.totalPrice = this.sf.value.prePay + this.sf.value.toPay + this.sf.value.oilCardPay + this.sf.value.receiptPay + this.otherPrice;
} }
} }

View File

@ -1,7 +1,7 @@
/* /*
* @Author: your name * @Author: your name
* @Date: 2021-12-03 15:31:52 * @Date: 2021-12-03 15:31:52
* @LastEditTime: 2021-12-15 14:09:53 * @LastEditTime: 2021-12-21 10:16:11
* @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\order-management.module.ts * @FilePath: \tms-obc-web\src\app\routes\order-management\order-management.module.ts
@ -24,6 +24,7 @@ import { ConfirReceiptComponent } from './modal/bulk/confir-receipt/confir-recei
import { SureArriveComponent } from './modal/bulk/sure-arrive/sure-arrive.component'; import { SureArriveComponent } from './modal/bulk/sure-arrive/sure-arrive.component';
import { SureDepartComponent } from './modal/bulk/sure-depart/sure-depart.component'; import { SureDepartComponent } from './modal/bulk/sure-depart/sure-depart.component';
import { UpdateFreightComponent } from './modal/bulk/update-freight/update-freight.component'; import { UpdateFreightComponent } from './modal/bulk/update-freight/update-freight.component';
import { OneCarOrderCancelComponent } from './modal/vehicle/cancel/cancel.component';
import { VehicleConfirReceiptComponent } from './modal/vehicle/confir-receipt/confir-receipt.component'; import { VehicleConfirReceiptComponent } from './modal/vehicle/confir-receipt/confir-receipt.component';
import { VehicleSureArriveComponent } from './modal/vehicle/sure-arrive/sure-arrive.component'; import { VehicleSureArriveComponent } from './modal/vehicle/sure-arrive/sure-arrive.component';
import { VehicleSureDepartComponent } from './modal/vehicle/sure-depart/sure-depart.component'; import { VehicleSureDepartComponent } from './modal/vehicle/sure-depart/sure-depart.component';
@ -49,7 +50,8 @@ const COMPONENTS: Type<void>[] = [
VehicleConfirReceiptComponent, VehicleConfirReceiptComponent,
VehicleSureDepartComponent, VehicleSureDepartComponent,
VehicleSureArriveComponent, VehicleSureArriveComponent,
OrderManagementRiskDetailComponent OrderManagementRiskDetailComponent,
OneCarOrderCancelComponent
]; ];
@NgModule({ @NgModule({

View File

@ -1,7 +1,7 @@
/* /*
* @Author: your name * @Author: your name
* @Date: 2021-12-03 15:31:52 * @Date: 2021-12-03 15:31:52
* @LastEditTime: 2021-12-20 15:30:26 * @LastEditTime: 2021-12-21 13:17:37
* @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\services\order-management.service.ts * @FilePath: \tms-obc-web\src\app\routes\order-management\services\order-management.service.ts
@ -45,6 +45,36 @@ export class OrderManagementService extends BaseService {
$api_get_getFreightChangeWholeDetail = `/api/sdc/billFreightChangeApplication/getFreightChangeWholeDetail`; $api_get_getFreightChangeWholeDetail = `/api/sdc/billFreightChangeApplication/getFreightChangeWholeDetail`;
// 订单申请撤销 // 订单申请撤销
$api_get_revokeChangeRecord = `/api/sdc/billFreightChangeApplication/revokeChangeRecord`; $api_get_revokeChangeRecord = `/api/sdc/billFreightChangeApplication/revokeChangeRecord`;
// 运费变更申请-整车
$api_get_insertFreightChangeWhole = `/api/sdc/billFreightChangeApplication/insertFreightChangeWhole`;
// 取消订单
$api_get_cancelAnOrder = `/api/sdc/billOperate/cancelAnOrder`;
// 批量签收整车订单
$api_get_batchSignWholeOrder = `/api/sdc/billOperate/batchSignWholeOrder`;
// 批量签收大宗订单
$api_get_batchSignBulkOrder = `/api/sdc/billOperate/batchSignBulkOrder`;
// 大宗签收详情
$api_get_getBulkSignForDetail = `/api/sdc/billOperate/getBulkSignForDetail`;
// 整车签收详情
$api_get_getWholeSignForDetail = `/api/sdc/billOperate/getWholeSignForDetail`;
// 确认签收大宗订单
$api_get_signBulkOrder = `/api/sdc/billOperate/signBulkOrder`;
// 确认签收整车订单
$api_get_signWholeOrder = `/api/sdc/billOperate/signWholeOrder`;
// 上传图片
public $api_upload_url = `/api/mdc/pbc/upload/multipartFile/file`;
// 根据用户id查用户信息注意nickName才是用户名称
public $api_getUserDetailByAppUserId = `/api/mdc/cuc/userBasicInfo/get`;
// 根据车辆id查车辆信息
public $api_getCarLicenseByIds = `/api/mdc/cuc/carLicense/getCarLicenseByIds`;
// 统计【整车】订单状态数量
public $api_statisticalStatus = `/api/sdc/billOperate/getWholeStatistical`;
// 统计【大宗】订单状态数量
public $api_getBulkStatistical = `/api/sdc/billOperate/getBulkStatistical`;
// 变更运费页面-大宗
public $api_getFreightChangeBulkDetail = `/api/sdc/billFreightChangeApplication/getFreightChangeBulkDetail`;
// 变更运费页面-大宗
public $api_insertFreightChangeBulk = `/api/sdc/billFreightChangeApplication/insertFreightChangeBulk`;
constructor(public injector: Injector) { constructor(public injector: Injector) {
super(injector) super(injector)
} }

View File

@ -0,0 +1,44 @@
<div class="modal-header">
<div class="modal-title">添加司机</div>
</div>
<!-- <nz-spin *ngIf="!i" class="modal-spin"></nz-spin> -->
<div class="sfBox">
<sf #sf [compact]="true" [ui]="ui" [schema]="schema" [button]="'none'" *ngIf="schema">
<ng-template sf-template="tipsA" let-me let-ui="ui" let-schema="schema">
<div class="pr">
<dl class="tips">
<dt>正面照</dt>
<dd>示例</dd>
</dl>
<div class="pa"><img width="190" src="/assets/images/eg01.png" /></div>
</div>
</ng-template>
<ng-template sf-template="tipsB" let-me let-ui="ui" let-schema="schema">
<div class="pr">
<dl class="tips">
<dt>背面照</dt>
<dd>示例</dd>
</dl>
<div class="pa"><img width="190" src="/assets/images/eg02.png" /></div>
</div>
</ng-template>
</sf>
<sf #sf1 [compact]="true" [ui]="ui" [schema]="schema1" [button]="'none'" *ngIf="schema1"></sf>
<sf #sf2 [compact]="true" [ui]="ui" [schema]="schema2" [button]="'none'" *ngIf="schema2"></sf>
<!-- <div class="example" (click)="showExample()">
查看示例
<div class="popBox" *ngIf="showCardFlag">
<img src="https://ng.ant.design/assets/img/logo.svg" alt="">
</div>
</div>
<div class="example positionSet" (click)="showJopExample()">
查看示例
<div class="popBox" *ngIf="showJopFlag">
<img src="https://ng.ant.design/assets/img/logo.svg" alt="">
</div>
</div> -->
</div>
<div class="modal-footer">
<button nz-button type="button" (click)="close()">关闭</button>
<button nz-button type="button" nzType="primary" (click)="submitForm()">确定</button>
</div>

View File

@ -0,0 +1,25 @@
.pr {
position: relative;
}
.pa {
position: absolute;
top: 35px;
left: 150px;
}
.tips {
display: flex;
margin-bottom: 0;
color: #333;
dt {
width: 150px;
}
dd {
width: 190px;
margin-bottom: 0;
text-align: center;
}
}

View File

@ -0,0 +1,24 @@
import { waitForAsync, ComponentFixture, TestBed } from '@angular/core/testing';
import { CarAddDriverComponent } from './add-driver.component';
describe('CarAddDriverComponent', () => {
let component: CarAddDriverComponent;
let fixture: ComponentFixture<CarAddDriverComponent>;
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
declarations: [ CarAddDriverComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(CarAddDriverComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

View File

@ -0,0 +1,556 @@
import { Component, OnInit, ViewChild } from '@angular/core';
import { apiConf } from '@conf/api.conf';
import { cacheConf } from '@conf/cache.conf';
import { SFComponent, SFUISchema, SFSchema, SFUploadWidgetSchema, SFDateWidgetSchema } from '@delon/form';
import { _HttpClient } from '@delon/theme';
import { EACacheService, EAEnvironmentService } from '@shared';
import { NzModalRef } from 'ng-zorro-antd/modal';
import { Observable, Observer } from 'rxjs';
import { map } from 'rxjs/operators';
import { SupplyManagementService } from '../../services/supply-management.service';
@Component({
selector: 'app-car-add-driver',
templateUrl: './add-driver.component.html',
styleUrls: ['./add-driver.component.less']
})
export class CarAddDriverComponent implements OnInit {
@ViewChild('sf', { static: false }) sf!: SFComponent;
@ViewChild('sf1', { static: false }) sf1!: SFComponent;
@ViewChild('sf2', { static: false }) sf2!: SFComponent;
record: any = {};
i: any;
ui: SFUISchema = {};
schema: SFSchema = {};
schema1: SFSchema = {};
schema2: SFSchema = {};
showCardFlag = false;
showJopFlag = false;
detailData: any = {
identityInfoDTO: {},
userDriverLicenseDTO: {},
userPracticeSeniorityDTO: {}
};
companyData: any = {};
mobile = ''
constructor(
private modal: NzModalRef,
public service: SupplyManagementService,
private envSrv: EAEnvironmentService,
private eaCacheSrv: EACacheService,
) { }
ngOnInit(): void {
this.companyData = this.eaCacheSrv.get(cacheConf.env)
this.initSF()
}
initSF() {
this.schema = {
properties: {
titleA: {
title: '司机信息(必填)',
type: 'string',
ui: {
widget: 'text',
},
default: '照片上传后会自动识别文字并填充下列内容栏'
},
mobile: {
title: '手机号',
type: 'string',
format: 'email',
maxLength: 11,
ui: {
widget: 'text',
},
default: this.mobile
},
showName: {
title: '身份证照片',
type: 'string',
ui: {
widget: 'text',
showRequired: true,
},
default: '请上传身份证原件的高清照片,若上传复印件,则需加盖公司印章及法人签字;上传后系统会自动识别并填写',
},
tipsA: {
title: '',
type: 'string',
ui: {
widget: 'custom',
offsetControl: 6,
},
},
certificatePhotoFrontWatermark: {
type: 'string',
title: '',
ui: {
offsetControl: 6,
action: apiConf.fileUpload,
fileType: 'image/png,image/jpeg,image/jpg,image/gif',
limit: 1,
limitFileCount: 1,
resReName: 'data.fullFileWatermarkPath',
urlReName: 'data.fullFileWatermarkPath',
widget: 'upload',
descriptionI18n: '图片支持jpg、jpeg、png、gif格式大小不超过2M',
data: {
appId: this.envSrv.env.appId,
},
name: 'multipartFile',
multiple: false,
listType: 'picture-card',
change: (args) => {
if (args.type === 'success') {
this.detailData.certificatePhotoFront = args.file.response.data.fullFilePath
this.checkIdCard(args.file.response.data.fullFilePath, 'front', 0);
}
},
beforeUpload: (file: any, _fileList) => {
return new Observable((observer: Observer<boolean>) => {
const isLt2M = file.size / 1024 / 1024 < 2;
if (!isLt2M) {
this.service.msgSrv.warning('图片大小超过2M!');
observer.complete();
return;
}
observer.next(isLt2M);
observer.complete();
});
},
} as SFUploadWidgetSchema,
},
tipsB: {
title: '',
type: 'string',
ui: {
widget: 'custom',
offsetControl: 6,
},
},
certificatePhotoBackWatermark: {
type: 'string',
title: '',
ui: {
offsetControl: 6,
action: apiConf.fileUpload,
fileType: 'image/png,image/jpeg,image/jpg,image/gif',
limit: 1,
limitFileCount: 1,
resReName: 'data.fullFileWatermarkPath',
urlReName: 'data.fullFileWatermarkPath',
widget: 'upload',
descriptionI18n: '图片支持jpg、jpeg、png、gif格式大小不超过2M',
data: {
appId: this.envSrv.env.appId,
},
name: 'multipartFile',
multiple: false,
listType: 'picture-card',
change: (args) => {
if (args.type === 'success') {
this.detailData.certificatePhotoBack = args.file.response.data.fullFilePath
this.checkIdCard(args.file.response.data.fullFilePath, 'back', 0);
}
},
beforeUpload: (file: any, _fileList) => {
return new Observable((observer: Observer<boolean>) => {
const isLt2M = file.size / 1024 / 1024 < 2;
if (!isLt2M) {
this.service.msgSrv.warning('图片大小超过2M!');
observer.complete();
return;
}
observer.next(isLt2M);
observer.complete();
});
},
} as SFUploadWidgetSchema,
},
name: {
title: '姓名',
type: 'string',
maxLength: 32,
ui: {
widget: '',
placeholder: '请输入姓名',
},
},
certificateNumber: {
title: '身份证号',
type: 'string',
format: 'id-card',
minLength: 1,
maxLength: 18,
ui: {
widget: '',
placeholder: '请输入法定代表人证件号',
errors: {
required: '请输入18位身份证号码',
},
},
},
},
required: [
'certificatePhotoFrontWatermark',
'certificatePhotoBackWatermark',
'name',
'certificateNumber'
],
};
this.schema1 = {
properties: {
titleB: {
title: '驾驶证信息(必填)',
type: 'string',
ui: {
widget: 'text',
},
default: '照片上传后会自动识别文字并填充下列内容栏'
},
certificatePhotoWatermark: {
type: 'string',
title: '驾驶证照片',
ui: {
action: apiConf.fileUpload,
fileType: 'image/png,image/jpeg,image/jpg,image/gif',
limit: 1,
limitFileCount: 1,
resReName: 'data.fullFileWatermarkPath',
urlReName: 'data.fullFileWatermarkPath',
widget: 'upload',
descriptionI18n: '请上传驾驶证照片支持JPG、PNG格式文件小于5M。照片信息缺失、拼凑、过度PS、模糊不清都不会通过审核。',
data: {
appId: this.envSrv.env.appId,
},
name: 'multipartFile',
multiple: false,
listType: 'picture-card',
change: (args) => {
if (args.type === 'success') {
this.detailData.userDriverLicenseDTO.certificatePhoto = args.file.response.data.fullFilePath
this.checkDriverCard(args.file.response.data.fullFilePath, 'front', 0);
}
},
beforeUpload: (file: any, _fileList) => {
return new Observable((observer: Observer<boolean>) => {
const isLt4M = file.size / 1024 / 1024 < 4;
if (!isLt4M) {
this.service.msgSrv.warning('图片大小超过4M!');
observer.complete();
return;
}
observer.next(isLt4M);
observer.complete();
});
},
} as SFUploadWidgetSchema,
},
licenseNo: {
title: '驾驶证号',
type: 'string',
ui: {
// widget: 'text',
placeholder: '请输入',
},
// default: this.ar.snapshot.queryParams.licenseNo
},
driverModel: {
title: '准驾车型',
type: 'string',
enum: [
{label: 'A1', value: 0},
{label: 'B1', value: 1},
],
ui: {
// widget: this.detailData.commitFlag !== 0 ? 'text' : '',
placeholder: '请输入',
},
},
validStartTime: {
title: '法人证件有效开始日期',
type: 'string',
ui: {
widget: 'date',
format: 'yyyy-MM-dd',
placeholder: '请选择',
errors: {
required: '请选择起始日期',
},
change: (i) => { },
} as SFDateWidgetSchema,
},
validEndTime: {
title: '法人证件有效开始日期',
type: 'string',
ui: {
widget: 'date',
format: 'yyyy-MM-dd',
placeholder: '请选择',
errors: {
required: '请选择起始日期',
},
change: (i) => { },
} as SFDateWidgetSchema,
},
signingOrganization: {
title: '签发机关',
type: 'string',
maxLength: 30,
ui: {
// widget: this.detailData.commitFlag !== 0 ? 'text' : '',
placeholder: '请输入',
},
},
},
required: [
'certificatePhotoWatermark',
'licenseNo',
'driverModel',
'validStartTime',
'validEndTime',
],
};
this.schema2 = {
properties: {
titleC: {
title: '从业资格证(选填)',
type: 'string',
ui: {
widget: 'text',
},
default: '照片上传后会自动识别文字并填充下列内容栏',
},
certificatePhotoWatermark: {
type: 'string',
title: '',
ui: {
offsetControl: 6,
action: apiConf.fileUpload,
fileType: 'image/png,image/jpeg,image/jpg,image/gif',
limit: 1,
limitFileCount: 1,
resReName: 'data.fullFileWatermarkPath',
urlReName: 'data.fullFileWatermarkPath',
widget: 'upload',
descriptionI18n: '图片支持jpg、jpeg、png、gif格式大小不超过5M',
data: {
appId: this.envSrv.env.appId,
},
name: 'multipartFile',
multiple: false,
listType: 'picture-card',
change: (args) => {
if (args.type === 'success') {
this.detailData.userPracticeSeniorityDTO.certificatePhoto = args.file.response.data.fullFilePath
//this.checkIdCard(args.file.response.data.fullFile, 0, 0);
}
},
beforeUpload: (file: any, _fileList) => {
return new Observable((observer: Observer<boolean>) => {
const isLt2M = file.size / 1024 / 1024 < 2;
if (!isLt2M) {
this.service.msgSrv.warning('图片大小超过2M!');
observer.complete();
return;
}
observer.next(isLt2M);
observer.complete();
});
},
} as SFUploadWidgetSchema,
},
licenseNo: {
title: '从业资格证号',
type: 'string',
maxLength: 30,
ui: {
// widget: this.detailData.commitFlag !== 0 ? 'text' : '',
placeholder: '请输入',
},
},
regionCode: {
title: '签发省份',
type: 'string',
ui: {
widget: 'select',
placeholder: '请选择',
asyncData: () => this.getProvinceData(),
} as SFDateWidgetSchema,
},
validStartTime: {
title: '发证日期',
type: 'string',
ui: {
widget: 'date',
format: 'yyyy-MM-dd',
placeholder: '请选择',
errors: {
required: '请选择起始日期',
},
change: (i) => { },
} as SFDateWidgetSchema,
},
validEndTime: {
title: '有效期止',
type: 'string',
ui: {
widget: 'date',
format: 'yyyy-MM-dd',
placeholder: '请选择',
errors: {
required: '请选择起始日期',
},
change: (i) => { },
} as SFDateWidgetSchema,
},
},
required: [
],
};
this.ui = {
'*': {
spanLabelFixed: 180,
grid: { span: 24 },
width: 700,
},
$title1: {
spanLabelFixed: 0,
},
$title2: {
spanLabelFixed: 0,
},
$title3: {
spanLabelFixed: 0,
},
$title4: {
spanLabelFixed: 0,
},
$enterpriseRegistrationTime: {
width: 680,
},
$operatingEndTime: {
grid: { span: 9 },
},
$dateType: {
grid: { span: 4 },
},
$validEndTime: {
grid: { span: 9 },
},
$dateType01: {
grid: { span: 4 },
},
$registrationCapital: {
grid: { span: 12 },
},
$unit: {
spanLabelFixed: 20,
grid: { span: 3 },
},
};
}
getProvinceData() {
// return this.service.request(this.service.$api_getRegionByCode, { regionCode: '' }).pipe(
// map(res => {
// const result: any = []
// if (res) {
// res.map((m: any) => {
// const item = { label: m.name, value: m.regionCode }
// result.push(item)
// });
// }
// return result
// })
// );
}
checkIdCard(imgurl: any, side: any, type: any) {
// 识别身份证 参数side0-正面、1-背面type0-申请人身份证1-法定代表人身份证
const params = {
idCardUrl: imgurl,
side,
};
// this.service.request(this.service.$api_checkIdCard, params).subscribe((res) => {
// if (res) {
// if (type === 0) {
// // 法定代表人身份证
// if (side === 'front') {
// // 正面
// this.sf.setValue('/name', res.name);
// this.sf.setValue('/certificateNumber', res.number);
// }
// }
// }
// });
}
checkDriverCard(imgurl: any, side: any, type: any) {
// 识别身份证 参数side0-正面、1-背面type0-申请人身份证1-法定代表人身份证
const params = {
driverLicenseUrl: imgurl,
side,
};
// this.service.request(this.service.$api_recognizeDriverLicense, params).subscribe((res) => {
// if (res) {
// if (type === 0) {
// // 法定代表人身份证
// if (side === 'front') {
// // 正面
// this.sf1.setValue('/licenseNo', res.number);
// this.sf1.setValue('/driverModel', res.number);
// this.sf1.setValue('/validStartTime', res.validFrom);
// this.sf1.setValue('/validEndTime', res.validTo);
// this.sf1.setValue('/signingOrganization', res.issuingAuthority);
// }
// }
// }
// });
}
close(): void {
this.modal.destroy();
}
showExample(){
this.showCardFlag = !this.showCardFlag
}
showJopExample(){
this.showJopFlag = !this.showJopFlag
}
submitForm(){
const params:any = {
enterpriseId: this.companyData.enterpriseId,
enterpriseProjectId: this.companyData.projectId,
source: 1,
mobile: this.mobile,
identityInfoDTO:{
...this.sf.value,
certificatePhotoFront: this.detailData.certificatePhotoFront,
certificatePhotoBack: this.detailData.certificatePhotoBack,
},
userDriverLicenseDTO: {
...this.sf1.value,
certificatePhoto: this.detailData.userDriverLicenseDTO.certificatePhoto,
},
userPracticeSeniorityDTO: {
...this.sf2.value,
certificatePhoto: this.detailData.userPracticeSeniorityDTO.certificatePhoto,
},
};
params.identityInfoDTO.certificatePhotoFrontWatermark = this.sf?.value.certificatePhotoFrontWatermark
params.identityInfoDTO.certificatePhotoBackWatermark = this.sf?.value.certificatePhotoBackWatermark
params.userDriverLicenseDTO.certificatePhotoWatermark = this.sf1?.value.certificatePhotoWatermark
params.userPracticeSeniorityDTO.certificatePhotoWatermark = this.sf2?.value.certificatePhotoWatermark
delete params.identityInfoDTO.titleA;
delete params.identityInfoDTO.titleB;
delete params.identityInfoDTO.titleC;
delete params.userDriverLicenseDTO.tipsA;
delete params.userPracticeSeniorityDTO.tipsC;
delete params.showName
// this.service.request(this.service.$api_enterpriseVehicleSave, params).subscribe(res => {
// if(res){
// this.service.msgSrv.success('添加成功')
// this.close()
// }
// })
}
}

View File

@ -0,0 +1,48 @@
<div class="modal-header">
<div class="modal-title">新增</div>
</div>
<!-- <nz-spin *ngIf="!i" class="modal-spin"></nz-spin> -->
<div>
<!-- 搜索表单 -->
<div nz-row nzGutter="8">
<!-- 查询字段小于或等于3个时不显示伸缩按钮 -->
<div nz-col nzSpan="24" *ngIf="queryFieldCount <= 4">
<sf #sf [schema]="schema" [ui]="ui" [mode]="'search'" [disabled]="!sf?.valid" [loading]="service.http.loading" (formSubmit)="initData(true)" (formReset)="resetSF()"></sf>
</div>
<!-- 查询字段大于3个时根据展开状态调整布局 -->
<ng-container *ngIf="queryFieldCount > 4">
<div nz-col [nzSpan]="_$expand ? 24 : 18">
<sf #sf [schema]="schema" [ui]="ui" [compact]="true" [button]="'none'"></sf>
</div>
<div nz-col [nzSpan]="_$expand ? 24 : 6" [class.text-right]="_$expand">
<button nz-button nzType="primary" [disabled]="!sf.valid" [nzLoading]="service.http.loading" (click)="initData(true)">查询</button>
<button nz-button (click)="resetSF()">重置</button>
<button nz-button nzType="link" (click)="expandToggle()">
{{ !_$expand ? '展开' : '收起' }}
<i nz-icon [nzType]="!_$expand ? 'down' : 'up'"></i>
</button>
</div>
</ng-container>
</div>
<!-- 数据列表 -->
<!-- [data]="service.$api_getCarCaptainByMobile" -->
<div *ngIf="sf?.value?.mobile && tableData?.length > 0">
<st #st multiSort bordered [columns]="columns" [ps]="20" [req]="{ method: 'POST', allInBody: true, reName: { pi: '', ps: '' }, params: reqParams }" [res]="{ reName: { list: 'data', total: 'data.total' } }" [page]="{ show: true, showSize: true, pageSizes: [20, 50, 100] }"
[loading]="service.http.loading" [data]="tableData">
<ng-template st-row="carModel" let-item let-index="index">
<span>{{item.carModel}};{{item.carLength}};{{item.carLoad}};</span>
</ng-template>
</st>
</div>
<div class="noContent" *ngIf="sf?.value?.mobile && tableData?.length === 0 && flag">
抱歉,该手机号还未注册,仍然需要添加请点击 <span (click)="addModal()">继续添加
</span>
</div>
</div>
<div class="modal-footer">
<button nz-button type="button" (click)="close()">关闭</button>
</div>

View File

@ -0,0 +1,38 @@
:host{
::ng-deep{
.ant-card-meta-title{
display: flex;
align-items: center;
justify-content: space-between;
}
.nameBox {
display: flex;
align-items: baseline;
.name{
margin: 0 10px 0 0;
}
}
.ant-badge-status{
color: #666
}
}
.title{
clear: both;
margin: 10px 0;
font-weight: bold;
font-size: 14px;
}
.noContent{
width: 100%;
min-height: 300px;
font-size: 16px;
line-height: 300px;
text-align: center;
span {
color: #1890ff;
cursor: pointer;
}
}
}

View File

@ -0,0 +1,24 @@
import { waitForAsync, ComponentFixture, TestBed } from '@angular/core/testing';
import { CarAddmodalComponent } from './addmodal.component';
describe('CarAddmodalComponent', () => {
let component: CarAddmodalComponent;
let fixture: ComponentFixture<CarAddmodalComponent>;
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
declarations: [ CarAddmodalComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(CarAddmodalComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

View File

@ -0,0 +1,179 @@
import { Component, OnInit, ViewChild } from '@angular/core';
import { Router, ActivatedRoute } from '@angular/router';
import { cacheConf } from '@conf/cache.conf';
import { STColumn, STComponent, STChange, STData } from '@delon/abc/st';
import { SFUISchema, SFSchema, SFComponent } from '@delon/form';
import { ModalHelper, _HttpClient } from '@delon/theme';
import { EACacheService } from '@shared';
import { NzModalRef } from 'ng-zorro-antd/modal';
import { SupplyManagementService } from '../../services/supply-management.service';
import { CarAddDriverComponent } from '../add-driver/add-driver.component';
@Component({
selector: 'app-car-addmodal',
templateUrl: './addmodal.component.html',
styleUrls: ['./addmodal.component.less']
})
export class CarAddmodalComponent implements OnInit {
@ViewChild('st', { static: false }) st!: STComponent;
@ViewChild('sf', { static: false }) sf!: SFComponent;
_$expand = false;
ui!: SFUISchema;
schema!: SFSchema;
columns!: STColumn[];
tableData: any = [];
companyData: any = {};
flag = false
constructor(
private modal: NzModalRef,
private eaCacheSrv: EACacheService,
public service: SupplyManagementService, private router: Router, private ar: ActivatedRoute,
private modalHelper: ModalHelper
) { }
/**
* 查询字段个数
*/
get queryFieldCount(): number {
return Object.keys(this.schema?.properties || {}).length;
}
/**
* 查询参数
*/
get reqParams() {
const params = Object.assign({}, this.sf?.value || {});
delete params._$expand;
return { ...params };
}
/**
* 选中行
*/
get selectedRows() {
return this.st?.list.filter((item: any) => item.checked) || [];
}
/**
* 伸缩查询条件
*/
expandToggle() {
this._$expand = !this._$expand;
this.sf?.setValue('/_$expand', this._$expand);
}
/**
* 重置表单
*/
resetSF() {
this.sf.reset();
this._$expand = false;
}
/**
* 程序初始化入口
*/
ngOnInit() {
this.companyData = this.eaCacheSrv.get(cacheConf.env)
this.initSF();
this.initST()
this.initData()
}
/**
* 初始化查询表单
*/
initSF() {
this.schema = {
properties: {
_$expand: { type: 'boolean', ui: { hidden: true } },
mobile: { title: '司机手机号', type: 'string', maxLength: 11, ui: { showRequired: false, placeholder: '请输入司机手机号', } },
},
};
this.ui = {
'*': { spanLabelFixed: 120, grid: { span: 8, gutter: 4 }, enter: () => this.st?.load(1) },
$time: { grid: { span: 24 } },
};
}
/**
* 初始化数据列表
*/
initST() {
this.columns = [
{ title: '司机头像', type: 'img', index: 'avatar', className: 'text-center' },
{ title: '司机姓名', index: 'name', className: 'text-center' },
{ title: '当前车辆', index: 'carNo', className: 'text-center' },
{ title: '车辆信息', render: 'carModel', className: 'text-center' },
{
title: '个人认证状态',
index: 'identityStatus',
className: 'text-center',
type: 'enum',
enum: {
10: '待审核',
20: '已成功',
30: '已驳回',
40: '证件过期',
}
},
{ title: '驾驶证类型', index: 'createTime', className: 'text-center' },
{
title: '操作',
width: '180px',
className: 'text-center',
buttons: [
{ text: '添加', click: (_record: any) => this.add(_record) },
],
},
];
}
initData(flag?: any) {
if (this.sf?.value.mobile) {
this.flag = flag
// this.service.request(this.service.$api_getCarCaptainByMobile, { mobile: this.sf?.value.mobile }).subscribe(res => {
// if (res.userId) {
// this.tableData = [res];
// } else {
// this.tableData = []
// }
// this.st.reload()
// })
}
}
/**
* 数据列表状态变化事件
*/
change(change: STChange) {
// console.log(change);
}
/**
* 新增
*/
add(item: any) {
const params: any = {
enterpriseId: this.companyData.enterpriseId,
enterpriseProjectId: this.companyData.projectId,
source: 1,
appUserId: item.appUserId ? item.appUserId : '',
mobile: item.mobile
}
// this.service.request(this.service.$api_enterpriseVehicleSave, params).subscribe(res => {
// if (res.data) {
// this.service.msgSrv.success('添加成功')
// }
// })
}
addModal() {
this.modalHelper.create(CarAddDriverComponent, {mobile: this.sf?.value.mobile}, { size: 900 }).subscribe((res) => {
this.initData()
});
//this.router.navigate(['/car/add'])
}
goBack() {
window.history.go(-1);
}
close(): void {
this.modal.destroy();
}
}

View File

@ -1,15 +1,59 @@
<!-- <!--
* @Author: your name * @Author: your name
* @Date: 2021-12-03 11:10:14 * @Date: 2021-12-03 11:10:14
* @LastEditTime: 2021-12-07 19:51:34 * @LastEditTime: 2021-12-21 10:56:30
* @LastEditors: your name * @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\supply-management\components\assigned-car\assigned-car.component.html * @FilePath: \tms-obc-web\src\app\routes\supply-management\components\assigned-car\assigned-car.component.html
--> -->
<div> <div>
<sf #sf [schema]="schema" [ui]="ui" [compact]="true" [button]="'none'"></sf> <div nz-row>
<div nz-col nzSpan="18">
<sf #sf [schema]="schema" mode="search" [ui]="ui" [compact]="true" (formSubmit)="st.load(1)"
(formReset)="reset()"></sf>
</div>
<div nz-col nzSpan="6">
<button nz-button nzType="primary" style="margin-bottom: 24px" (click)="addDriver()"><i nz-icon
nzType="plus"></i>添加司机</button>
</div>
</div>
<div> <div>
<!-- <st #st [data]="service.$api_get_catalogue_member" [columns]="columns"> --> <st #st [data]="service.$api_get_catalogue_member"
<!-- </st> --> [req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' }, params: reqParams }"
[columns]="columns" [res]="{ reName: { list: 'data.records', total: 'data.total' },process:dataProcess }"
[page]="{ show: true, showSize: true, pageSizes: [10, 20, 30, 50, 100, 200, 300, 500, 1000] }"
(change)="changeSt($event)">
<ng-template st-row="carId" let-item let-index="index">
<nz-select [(ngModel)]="item.carId" style="width: 280px;">
<nz-option [nzValue]="''" nzLabel="不限"></nz-option>
<nz-option [nzValue]="car.carId" [nzLabel]="car.carNo"
*ngFor="let car of item.userCarLicenseDesensitizationVOList" [nzCustomContent]="true">
<span>{{car.carNo}} -</span>
<span>{{car.carLength}}米,{{car.carLoad}}顿 -</span>
<span *ngIf="car?.approvalStatus === '20' && car.carStatus === '0'" class="text-success-dark">空闲</span>
<span *ngIf="car?.approvalStatus === '20' && car.carStatus === '1'" class="text-warning-dark">已被指派</span>
<span *ngIf="car?.approvalStatus !== '20'" class="text-red-dark">未认证</span>
<!-- <span [ngClass]="cardBADGE[car.carStatus]?.color">{{cardBADGE[car.carStatus]?.text}}</span> -->
</nz-option>
</nz-select>
</ng-template>
<ng-template st-row="carCaptain" let-item let-index>
<span>{{item.name}} {{item.phone}}</span>
<a (click)="setCarCaptain(item)">设置</a>
</ng-template>
<ng-template st-row="driverStatus" let-item let-index>
<span *ngIf="item?.certificationStatus === '20' && item.driverStatus === '0'"
class="text-success-dark">空闲</span>
<span *ngIf="item?.certificationStatus === '20' && item.driverStatus === '1'"
class="text-warning-dark">已被指派</span>
<span *ngIf="item?.certificationStatus !== '20'" class="text-red-dark">未认证</span>
</ng-template>
</st>
</div>
<div class="modal-footer">
<button nz-button type="button" (click)="close()">关闭</button>
<button nz-button type="submit" nzType="primary" (click)="save()" [disabled]="!selectedRows"
[nzLoading]="service.http.loading">发布并指派给司机</button>
</div> </div>
</div> </div>

View File

@ -1,10 +1,19 @@
import { Component, OnInit } from '@angular/core'; import { Component, OnInit, ViewChild } from '@angular/core';
import { STColumn } from '@delon/abc/st'; import { STChange, STColumn, STColumnBadge, STComponent, STData } from '@delon/abc/st';
import { SFSchema, SFUISchema } from '@delon/form'; import { SFComponent, SFSchema, SFUISchema } from '@delon/form';
import { _HttpClient } from '@delon/theme'; import { ModalHelper, _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 { SupplyManagementService } from '../../services/supply-management.service'; import { SupplyManagementService } from '../../services/supply-management.service';
import { SupplyManagementAddDriversComponent } from '../add-drivers/add-drivers.component';
import { CarAddmodalComponent } from '../addmodal/addmodal.component';
const BADGE: STColumnBadge = {
1: { text: '空闲', color: 'success' },
2: { text: '未实名', color: 'error' },
3: { text: '在途', color: 'warning' },
};
@Component({ @Component({
selector: 'app-supply-management-assigned-car', selector: 'app-supply-management-assigned-car',
@ -16,15 +25,38 @@ export class SupplyManagementAssignedCarComponent implements OnInit {
schema: SFSchema = {}; schema: SFSchema = {};
ui: SFUISchema = {}; ui: SFUISchema = {};
columns: STColumn[] = []; columns: STColumn[] = [];
@ViewChild('st') st!: STComponent;
@ViewChild('sf', { static: false }) sf!: SFComponent;
status: string = 'anew';
url = ''; // 请求的api地址
params: any = {}; // 传进来的参数
cardBADGE: STColumnBadge | any = {
0: { text: '空闲', color: 'success' },
1: { text: '在途', color: 'warning' },
2: { text: '未认证', color: 'error' },
};
selectedRows: any = null; // 已选行
constructor( constructor(
private modal: NzModalRef, private modal: NzModalRef,
private msgSrv: NzMessageService, private msgSrv: NzMessageService,
public service: SupplyManagementService public service: SupplyManagementService,
private modalHelper: ModalHelper,
) { ) {
this.initSF(); this.initSF();
this.initSt(); this.initSt();
} }
/**
* 查询参数
*/
get reqParams() {
return {
...this.sf?.value,
};
}
/** /**
* 初始化查询表单 * 初始化查询表单
*/ */
@ -32,24 +64,24 @@ export class SupplyManagementAssignedCarComponent implements OnInit {
this.schema = { this.schema = {
properties: { properties: {
_$expand: { type: 'boolean', ui: { hidden: true } }, _$expand: { type: 'boolean', ui: { hidden: true } },
no: { nameOrPhone: {
type: 'string', type: 'string',
title: '', title: '',
ui: { ui: {
placholder: '请输入司机姓名/手机号' placeholder: '请输入司机姓名/手机号'
} }
}, },
no2: { carNo: {
type: 'string', type: 'string',
title: '', title: '',
ui: { ui: {
placholder: '请输入车牌号' placeholder: '请输入车牌号'
} }
}, },
}, },
type: 'object', type: 'object',
}; };
this.ui = { '*': { spanLabelFixed: 80, grid: { span: 12, gutter: 4 } } }; this.ui = { '*': { spanLabelFixed: 10, grid: { span: 8, gutter: 1 } } };
} }
/** /**
@ -57,25 +89,79 @@ export class SupplyManagementAssignedCarComponent implements OnInit {
*/ */
initSt() { initSt() {
this.columns = [ this.columns = [
{ width: 50, type: 'checkbox', className: 'text-center' }, { width: 50, type: 'radio', className: 'text-center' },
{ title: '司机姓名', width: 80, index: 'owner', className: 'text-center' }, { title: '司机姓名', width: 120, index: 'name', className: 'text-center' },
{ title: '手机号', index: 'goodsQuantity', width: 100, className: 'text-center' }, { title: '手机号', index: 'telephone', width: 200, className: 'text-center' },
{ title: '车牌号', width: 100, index: 'carNo', className: 'text-center' }, { title: '车队长', render: 'carCaptain', className: 'text-center' },
{ title: '状态', index: 'status', width: 100, className: 'text-center' }, { title: '指定车辆', width: 300, render: 'carId', className: 'text-center' },
{ title: '状态', render: 'driverStatus', className: 'text-center', type: 'badge', badge: BADGE },
]; ];
} }
ngOnInit(): void { ngOnInit(): void {
} }
save(value: any): void { dataProcess(data: STData[]): STData[] {
this.service.request(`/user/${this.record.id}`, value).subscribe(res => { return data.map((i, index) => {
this.msgSrv.success('保存成功'); i.carId = '';
this.modal.close(true); i.disabled = i.carStatus === '1';
const defaultCar = i?.userCarLicenseDesensitizationVOList?.filter((item: any) => item.isDefault);
if (defaultCar.length > 0) {
i.carId = defaultCar[0].carId;
}
return i;
});
}
save(): void {
console.log(this.selectedRows);
if (this.selectedRows) {
const { carId, userId: driverId } = this.selectedRows;
const params: any = { carId, driverId };
this.service.request(this.url, { ...params, ...this.params }).subscribe((res: any) => {
if (res) {
this.modal.close(res);
}
})
}
}
changeSt(e: STChange): void {
if (e?.type === 'loaded') this.selectedRows = null;
if (e?.type === 'radio') this.selectedRows = e?.radio;
console.log(this.selectedRows);
}
/**
* 添加司机
* @param item
*/
addDriver() {
this.modalHelper.create(CarAddmodalComponent, {}, { size: 900, modalOptions: { nzMaskClosable: false } }).subscribe((res) => {
if (res) this.st.reload();
});
}
/**
* 设置车队长
*/
setCarCaptain(item: any) {
this.modalHelper.create(SupplyManagementAddDriversComponent, { dirvierInfo: item }, {
size: 900,
modalOptions: { nzMaskClosable: false, nzTitle: '设置' }
}
).subscribe((res) => {
if (res) this.st.reload();
}); });
} }
close(): void { close(): void {
this.modal.destroy(); this.modal.destroy();
} }
reset() {
this.sf.reset();
this.st.load(1);
}
} }

View File

@ -821,7 +821,7 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
maxCube: res?.goodsInfoVOList[0]?.maxCube?.split(',') , maxCube: res?.goodsInfoVOList[0]?.maxCube?.split(',') ,
maxWeight: res?.goodsInfoVOList[0]?.maxWeight?.split(',') , maxWeight: res?.goodsInfoVOList[0]?.maxWeight?.split(',') ,
number: res?.goodsInfoVOList[0]?.number , number: res?.goodsInfoVOList[0]?.number ,
goodsType: res?.goodsInfoVOList[0]?.goodsType , goodsTypeName: res?.goodsInfoVOList[0]?.goodsTypeName ,
modifyUserId: res?.goodsInfoVOList[0]?.modifyUserId , modifyUserId: res?.goodsInfoVOList[0]?.modifyUserId ,
resourceId: res?.goodsInfoVOList[0]?.resourceId , resourceId: res?.goodsInfoVOList[0]?.resourceId ,
rule: res?.goodsInfoVOList[0]?.rule , rule: res?.goodsInfoVOList[0]?.rule ,

View File

@ -288,7 +288,7 @@ export class SupplyManagementVehicleComponent implements OnInit {
}, },
{ {
text: '重新指派', text: '重新指派',
// click: (_record) => this.assignedCar(_record), click: (_record) => this.assignedCar(_record),
// iif: item => item.auditStatus === 2, // iif: item => item.auditStatus === 2,
}, },
], ],
@ -377,17 +377,28 @@ export class SupplyManagementVehicleComponent implements OnInit {
/** /**
* 重新指派 * 重新指派
*/ */
assignedCar(item: any) { assignedCar(item: any) {
const { resourceId } = item;
const modalRef = this.modal.create({ const modalRef = this.modal.create({
nzTitle: '指派熟车', nzTitle: '指派熟车',
nzWidth: '800px', nzWidth: '1200px',
nzContent: SupplyManagementAssignedCarComponent, nzContent: SupplyManagementAssignedCarComponent,
nzComponentParams: { nzComponentParams: {
i: item, i: item,
status: 'anew',
// url: this.service.$api_save_assign_vehicle,
params: { resourceId }
}, },
nzFooter: null, nzFooter: null,
});
modalRef.afterClose.subscribe((result) => {
if (result) {
this.st.reload();
}
}); });
} }
/** /**
* 审核 * 审核
*/ */

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: 2021-12-20 13:38:26 * @LastEditTime: 2021-12-21 11:04:45
* @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\supply-management.module.ts * @FilePath: \tms-obc-web\src\app\routes\supply-management\supply-management.module.ts
@ -26,6 +26,8 @@ import { PublishchooseFamifiarAddComponent } from './components/choose-famifiar/
import { SupplyManagementBulkPublishComponent } from './components/bulk-publish/bulk-publish.component'; import { SupplyManagementBulkPublishComponent } from './components/bulk-publish/bulk-publish.component';
import { PublishAddressListComponent } from './components/onecar-publish/address-list/address-list.component'; import { PublishAddressListComponent } from './components/onecar-publish/address-list/address-list.component';
import { PublishSuccessComponent } from './components/onecar-publish/publish-success/publish-success.component'; import { PublishSuccessComponent } from './components/onecar-publish/publish-success/publish-success.component';
import { CarAddDriverComponent } from './components/add-driver/add-driver.component';
import { CarAddmodalComponent } from './components/addmodal/addmodal.component';
const COMPONENTS: Type<void>[] = [ const COMPONENTS: Type<void>[] = [
@ -45,8 +47,9 @@ const COMPONENTS: Type<void>[] = [
PublishchooseFamifiarAddComponent, PublishchooseFamifiarAddComponent,
SupplyManagementBulkPublishComponent, SupplyManagementBulkPublishComponent,
PublishAddressListComponent, PublishAddressListComponent,
PublishSuccessComponent PublishSuccessComponent,
CarAddDriverComponent,
CarAddmodalComponent
]; ];
@NgModule({ @NgModule({

View File

@ -6,6 +6,8 @@ import { ShipperBaseService } from '@shared';
import { NzModalService } from 'ng-zorro-antd/modal'; import { NzModalService } from 'ng-zorro-antd/modal';
import { of } from 'rxjs'; import { of } from 'rxjs';
import { map } from 'rxjs/operators'; import { map } from 'rxjs/operators';
import { VehicleSureArriveComponent } from 'src/app/routes/order-management/modal/vehicle/sure-arrive/sure-arrive.component';
import { VehicleSureDepartComponent } from 'src/app/routes/order-management/modal/vehicle/sure-depart/sure-depart.component';
import { WaybillManagementServe } from '../../services/waybill-management.service'; import { WaybillManagementServe } from '../../services/waybill-management.service';
@ -333,6 +335,14 @@ tabs = {
text: '查看评价', text: '查看评价',
click: (_record) => this.viewEvaluate(_record), click: (_record) => this.viewEvaluate(_record),
}, },
{
text: '确认发车',
click: (_record) => this.sureDepart(_record),
},
{
text: '确认到车',
click: (_record) => this.sureArrive(_record),
},
], ],
}, },
]; ];
@ -511,4 +521,31 @@ tabs = {
} }
}) })
} }
// *确认发车
sureDepart(item: any) {
const modalRef = this.modal.create({
nzTitle: '确认发车',
nzWidth: '50%',
nzContent: VehicleSureDepartComponent,
nzComponentParams: {
i: item,
Status: 1
},
nzFooter: null
});
}
// 确认到车
sureArrive(item: any) {
const modalRef = this.modal.create({
nzTitle: '确认到车',
nzWidth: '50%',
nzContent: VehicleSureArriveComponent,
nzComponentParams: {
i: item,
Status: 1
},
nzFooter: null
});
}
} }

View File

@ -2,7 +2,7 @@ import { WaybillManagementBulkComponent } from './../components/bulk/bulk.compon
/* /*
* @Author: your name * @Author: your name
* @Date: 2021-12-07 14:52:29 * @Date: 2021-12-07 14:52:29
* @LastEditTime: 2021-12-18 16:06:43 * @LastEditTime: 2021-12-20 19:17:22
* @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\waybill-management\services\waybill-management.service.ts * @FilePath: \tms-obc-web\src\app\routes\waybill-management\services\waybill-management.service.ts
@ -39,7 +39,14 @@ export class WaybillManagementServe extends BaseService {
// 大宗确认发车 // 大宗确认发车
$api_get_insertBulkStartCarInfo= `/api/sdc/wayBillOperate/insertBulkStartCarInfo`; $api_get_insertBulkStartCarInfo= `/api/sdc/wayBillOperate/insertBulkStartCarInfo`;
// 整车确认发车
$api_get_insertWholeStartCarInfo= `/api/sdc/wayBillOperate/insertWholeStartCarInfo`;
// 整车确认到车
$api_get_insertWholeUnloadCarInfo = `/api/sdc/wayBillOperate/insertWholeUnloadCarInfo`;
// 大宗确认到车
$api_get_insertBulkUnloadCarInfo = `/api/sdc/wayBillOperate/insertBulkUnloadCarInfo`;
// 确认到车界面信息(两个只能看的图片)
$api_get_getUnloadCarInfo = `/api/sdc/wayBillOperate/getUnloadCarInfo`;
constructor(public injector: Injector) { constructor(public injector: Injector) {
super(injector) super(injector)
} }