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

This commit is contained in:
Taric Xin
2022-01-19 16:30:17 +08:00
19 changed files with 478 additions and 271 deletions

View File

@ -4,7 +4,7 @@
* @Author : Shiming * @Author : Shiming
* @Date : 2022-01-18 09:51:21 * @Date : 2022-01-18 09:51:21
* @LastEditors : Shiming * @LastEditors : Shiming
* @LastEditTime : 2022-01-19 11:29:14 * @LastEditTime : 2022-01-19 13:56:39
* @FilePath : \\tms-obc-web\\proxy.conf.js * @FilePath : \\tms-obc-web\\proxy.conf.js
* Copyright (C) 2022 huzhenhong. All rights reserved. * Copyright (C) 2022 huzhenhong. All rights reserved.
*/ */

View File

@ -4,7 +4,7 @@
* @Author : Shiming * @Author : Shiming
* @Date : 2022-01-12 10:52:50 * @Date : 2022-01-12 10:52:50
* @LastEditors : Shiming * @LastEditors : Shiming
* @LastEditTime : 2022-01-18 17:17:56 * @LastEditTime : 2022-01-19 14:39:52
* @FilePath : \\tms-obc-web\\src\\app\\routes\\order-management\\components\\bulk\\bulk.component.html * @FilePath : \\tms-obc-web\\src\\app\\routes\\order-management\\components\\bulk\\bulk.component.html
* Copyright (C) 2022 huzhenhong. All rights reserved. * Copyright (C) 2022 huzhenhong. All rights reserved.
--> -->
@ -71,7 +71,7 @@
</ng-template> </ng-template>
<ng-template st-row="driverName" let-item let-index="index"> <ng-template st-row="driverName" let-item let-index="index">
<div> <div>
{{item?.driverName}}/{{item?.driverPhone}} {{item?.driverName}}/{{item?.driverPhone}}/{{item?.carNo}}
</div> </div>
</ng-template> </ng-template>
<ng-template st-row="payeeName" let-item let-index="index"> <ng-template st-row="payeeName" let-item let-index="index">

View File

@ -238,7 +238,7 @@ export class OrderManagementBulkComponent implements OnInit {
} }
} }
}, },
captainName: { carCaptainName: {
title: '车队长', title: '车队长',
type: 'string', type: 'string',
ui: { ui: {
@ -247,7 +247,7 @@ export class OrderManagementBulkComponent implements OnInit {
} }
} }
}, },
paymentstatus: { paymentStatus: {
title: '支付状态', title: '支付状态',
type: 'string', type: 'string',
ui: { ui: {
@ -427,7 +427,7 @@ export class OrderManagementBulkComponent implements OnInit {
{ {
title: '承运司机', title: '承运司机',
className: 'text-left', className: 'text-left',
width: '180px', width: '250px',
index: 'driverName', index: 'driverName',
render: 'driverName' render: 'driverName'
}, },

View File

@ -126,6 +126,7 @@ export class OrderManagementComplaintComponent implements OnInit {
{ {
title: '投诉单号', title: '投诉单号',
width: '170px', width: '170px',
fixed: 'left',
className: 'text-center', className: 'text-center',
render: 'complaintCode' render: 'complaintCode'
}, },
@ -141,7 +142,7 @@ export class OrderManagementComplaintComponent implements OnInit {
index: 'complainantTime', index: 'complainantTime',
className: 'text-center', className: 'text-center',
}, },
{ title: '托运方', index: 'shipperAppUserName', width: '120px', className: 'text-center' }, { title: '托运方', index: 'shipperAppUserName', width: '200px', className: 'text-center' },
{ title: '司机', index: 'driverIdLabel', width: '120px', className: 'text-center' }, { title: '司机', index: 'driverIdLabel', width: '120px', className: 'text-center' },
{ {
title: '投诉原因', title: '投诉原因',

View File

@ -223,23 +223,23 @@ export class OrderManagementRiskComponent implements OnInit {
initST() { initST() {
this.columns = [ this.columns = [
{ title: '', type: 'checkbox', width: '50px', className: 'text-center' }, { title: '', type: 'checkbox', width: '50px', className: 'text-center' },
{
title: '申诉状态',
width: '100px',
className: 'text-left',
index: 'representationsStatusLabel'
},
{ {
title: '订单号', title: '订单号',
width: '200px', width: '200px',
className: 'text-left', className: 'text-left',
render: 'billCode' render: 'billCode'
}, },
{
title: '申诉状态',
width: '100px',
className: 'text-left',
index: 'representationsStatusLabel'
},
{ {
title: '货源编号', title: '货源编号',
width: '200px', width: '200px',
className: 'text-left', className: 'text-left',
index: 'resourceId' index: 'resourceCode'
}, },
{ {
title: '异常信息', title: '异常信息',

View File

@ -4,7 +4,7 @@
* @Author : Shiming * @Author : Shiming
* @Date : 2022-01-12 10:52:50 * @Date : 2022-01-12 10:52:50
* @LastEditors : Shiming * @LastEditors : Shiming
* @LastEditTime : 2022-01-18 17:12:59 * @LastEditTime : 2022-01-19 14:39:41
* @FilePath : \\tms-obc-web\\src\\app\\routes\\order-management\\components\\vehicle\\vehicle.component.html * @FilePath : \\tms-obc-web\\src\\app\\routes\\order-management\\components\\vehicle\\vehicle.component.html
* Copyright (C) 2022 huzhenhong. All rights reserved. * Copyright (C) 2022 huzhenhong. All rights reserved.
--> -->
@ -101,7 +101,7 @@
</ng-template> </ng-template>
<ng-template st-row="driverName" let-item let-index="index"> <ng-template st-row="driverName" let-item let-index="index">
<div> <div>
{{item?.driverName}}/{{item?.driverPhone}} {{item?.driverName}}/{{item?.driverPhone}}/{{item?.carNo}}
</div> </div>
</ng-template> </ng-template>
<ng-template st-row="payeeName" let-item let-index="index"> <ng-template st-row="payeeName" let-item let-index="index">

View File

@ -239,7 +239,7 @@ resourceStatus: any;
} }
} }
}, },
captainName: { carCaptainName: {
title: '车队长', title: '车队长',
type: 'string', type: 'string',
ui: { ui: {
@ -384,7 +384,7 @@ resourceStatus: any;
}, { }, {
title: '承运司机', title: '承运司机',
className: 'text-left', className: 'text-left',
width: '180px', width: '250px',
render: 'driverName' render: 'driverName'
}, },
{ {

View File

@ -40,7 +40,7 @@
</nz-form-item> </nz-form-item>
<nz-form-item> <nz-form-item>
<nz-form-label [nzSpan]="4" nzRequired>联系人</nz-form-label> <nz-form-label [nzSpan]="4" nzRequired>联系人</nz-form-label>
<div class="align-center"> <div style="display: flex;">
<nz-form-control [nzErrorTip]="'请输入联系人姓名'"> <nz-form-control [nzErrorTip]="'请输入联系人姓名'">
<input <input
nz-input nz-input
@ -92,7 +92,7 @@
</nz-form-item> </nz-form-item>
<nz-form-item> <nz-form-item>
<nz-form-label [nzSpan]="4" nzRequired>联系人</nz-form-label> <nz-form-label [nzSpan]="4" nzRequired>联系人</nz-form-label>
<div class="align-center"> <div style="display: flex;">
<nz-form-control [nzErrorTip]="'请输入联系人姓名'"> <nz-form-control [nzErrorTip]="'请输入联系人姓名'">
<input <input
nz-input nz-input
@ -240,8 +240,8 @@
<nz-card> <nz-card>
<div class="align-center"> <div class="align-center">
<!-- <button nz-button nzType="primary" (click)="chooseFamifiar()">生成二维码</button> --> <!-- <button nz-button nzType="primary" (click)="chooseFamifiar()">生成二维码</button> -->
<button nz-button nzType="primary" style="margin-left: 48px" (click)="submit('assign')">指派熟车</button> <button nz-button nzType="primary" style="margin-left: 48px" (click)="submitConfirm('assign')">指派熟车</button>
<!-- <button nz-button nzType="primary" (click)="choose()">取消</button> --> <!-- <button nz-button nzType="primary" (click)="choose()">取消</button> -->
<button nz-button nzType="primary" style="margin-left: 48px" (click)="submit('publish')">司机抢单</button> <button nz-button nzType="primary" style="margin-left: 48px" (click)="submitConfirm('publish')">司机抢单</button>
</div> </div>
</nz-card> </nz-card>

View File

@ -1,5 +1,5 @@
import { Component, OnInit, ViewChild } from '@angular/core'; import { Component, OnInit, ViewChild } from '@angular/core';
import { FormBuilder, FormGroup,Validators,FormControl } from '@angular/forms'; import { FormBuilder, FormGroup, Validators, FormControl } from '@angular/forms';
import { ActivatedRoute, Router } from '@angular/router'; import { ActivatedRoute, Router } from '@angular/router';
import { import {
SFComponent, SFComponent,
@ -14,17 +14,18 @@ import { _HttpClient } from '@delon/theme';
import { AmapPoiPickerComponent, AmapService, ShipperBaseService } from '@shared'; import { AmapPoiPickerComponent, AmapService, ShipperBaseService } from '@shared';
import { NzModalService } from 'ng-zorro-antd/modal'; import { NzModalService } from 'ng-zorro-antd/modal';
import { PublishGoodsChooseFamifiarComponent } from '../choose-famifiar/choose-famifiar.component'; import { PublishGoodsChooseFamifiarComponent } from '../choose-famifiar/choose-famifiar.component';
import { SupplyManagementService} from '../../services/supply-management.service'; import { SupplyManagementService } from '../../services/supply-management.service';
import { map } from 'rxjs/operators'; import { map } from 'rxjs/operators';
import { of } from 'rxjs'; import { of } from 'rxjs';
import { PublishSuccessComponent } from '../onecar-publish/publish-success/publish-success.component'; import { PublishSuccessComponent } from '../onecar-publish/publish-success/publish-success.component';
import { PublishAddressListComponent } from '../onecar-publish/address-list/address-list.component'; import { PublishAddressListComponent } from '../onecar-publish/address-list/address-list.component';
import { TranAgreementComponent } from '../tran-agreement/tran-agreement.component';
@Component({ @Component({
selector: 'app-publish-goods-bulk-publish', selector: 'app-publish-goods-bulk-publish',
templateUrl: './bulk-publish.component.html', templateUrl: './bulk-publish.component.html',
styleUrls: ['./bulk-publish.component.less'] styleUrls: ['./bulk-publish.component.less']
}) })
export class SupplyManagementBulkPublishComponent implements OnInit { export class SupplyManagementBulkPublishComponent implements OnInit {
validateForm1: FormGroup; validateForm1: FormGroup;
sf1data: any; // 货源单设置回显 sf1data: any; // 货源单设置回显
sf3data: any; // 货源单设置回显 sf3data: any; // 货源单设置回显
@ -38,7 +39,7 @@ export class SupplyManagementBulkPublishComponent implements OnInit {
totalTime = 0.0; //路程总时间 totalTime = 0.0; //路程总时间
currentGoodsTypeName: any; currentGoodsTypeName: any;
enterpriseProjectIds: any; enterpriseProjectIds: any;
id = this.route.snapshot.params.id; // 传参id id = this.route.snapshot.params.id; // 传参id
// // 单位 // // 单位
startInfo: any = []; startInfo: any = [];
endInfo: any = []; endInfo: any = [];
@ -51,16 +52,15 @@ export class SupplyManagementBulkPublishComponent implements OnInit {
private modalService: NzModalService, private modalService: NzModalService,
public service: SupplyManagementService, public service: SupplyManagementService,
private amapService: AmapService, private amapService: AmapService,
public shipperSrv: ShipperBaseService,) { public shipperSrv: ShipperBaseService
) {
this.validateForm1 = fb.group({ this.validateForm1 = fb.group({
createTime: [null, []],
modifyTime: [null, []],
loadAddress0: [null, [Validators.required]], loadAddress0: [null, [Validators.required]],
loadName0: [null, [Validators.required]], loadName0: [null, [Validators.required]],
loadPhone0: [null, [Validators.required]], loadPhone0: [null, [Validators.required, Validators.pattern('^[0-9]*$')]],
unloadAddress0: [null, [Validators.required]], unloadAddress0: [null, [Validators.required]],
unloadName0: [null, [Validators.required]], unloadName0: [null, [Validators.required]],
unloadPhone0: [null, [Validators.required]] unloadPhone0: [null, [Validators.required, Validators.pattern('^[0-9]*$')]]
}); });
} }
@ViewChild('sf1', { static: false }) sf1!: SFComponent; @ViewChild('sf1', { static: false }) sf1!: SFComponent;
@ -84,9 +84,9 @@ export class SupplyManagementBulkPublishComponent implements OnInit {
ui7!: SFUISchema; ui7!: SFUISchema;
// 初始化 // 初始化
ngOnInit(): void { ngOnInit(): void {
if(this.route.snapshot?.queryParams?.sta === '3') { if (this.route.snapshot?.queryParams?.sta === '3') {
this.PageStatus = '大宗修改'; this.PageStatus = '大宗修改';
} else if(this.route.snapshot?.queryParams?.sta === '4') { } else if (this.route.snapshot?.queryParams?.sta === '4') {
this.PageStatus = '大宗下一单'; this.PageStatus = '大宗下一单';
} }
this.initSF1(); this.initSF1();
@ -110,27 +110,27 @@ export class SupplyManagementBulkPublishComponent implements OnInit {
onSearch: (q: any) => { onSearch: (q: any) => {
if (!!q) { if (!!q) {
return this.service return this.service
.request(this.service.$api_enterpriceList, { enterpriseName: q}) .request(this.service.$api_enterpriceList, { enterpriseName: q })
.pipe(map((res) => (res as any[]).map((i) => ({ label: i.enterpriseName, value: i.id } as SFSchemaEnum)))) .pipe(map(res => (res as any[]).map(i => ({ label: i.enterpriseName, value: i.id } as SFSchemaEnum))))
.toPromise(); .toPromise();
} else { } else {
return of([]); return of([]);
} }
}, },
change: (q: any) => { change: (q: any) => {
this.getRegionCode(q) this.getRegionCode(q);
}, },
visibleIf: { visibleIf: {
_$expand: (value: boolean) => value, _$expand: (value: boolean) => value
}, }
} as SFSelectWidgetSchema, } as SFSelectWidgetSchema
}, },
enterpriseProjectId: { enterpriseProjectId: {
type: 'string', type: 'string',
title: '项目', title: '项目',
ui: { ui: {
widget: 'select', widget: 'select',
placeholder: '请选择', placeholder: '请选择'
} as SFSelectWidgetSchema } as SFSelectWidgetSchema
}, },
enterpriseInfoName: { enterpriseInfoName: {
@ -138,7 +138,7 @@ export class SupplyManagementBulkPublishComponent implements OnInit {
title: '网络货运人', title: '网络货运人',
ui: { ui: {
widget: 'text' widget: 'text'
}, }
}, },
deadlineTime: { deadlineTime: {
title: '截至日期', title: '截至日期',
@ -154,8 +154,8 @@ export class SupplyManagementBulkPublishComponent implements OnInit {
title: '手机号', title: '手机号',
maxLength: 30, maxLength: 30,
ui: { ui: {
hidden: true, hidden: true,
placeholder: '请输入' placeholder: '请输入'
} }
}, },
dispatchName: { dispatchName: {
@ -175,10 +175,10 @@ export class SupplyManagementBulkPublishComponent implements OnInit {
placeholder: '请选择', placeholder: '请选择',
allowClear: true, allowClear: true,
change: (value: any, data: any) => { change: (value: any, data: any) => {
if(data.label) { if (data.label) {
const dat = data.label.split('/') const dat = data.label.split('/');
this.sf1.setValue('/dispatchName', dat[0]); this.sf1.setValue('/dispatchName', dat[0]);
this.sf1.setValue('/dispatchPhone', dat[1]); this.sf1.setValue('/dispatchPhone', dat[1]);
} }
}, },
optionalHelp: '选择调度员,司机直接联系调度员 ; 不选择,司机直接联系您', optionalHelp: '选择调度员,司机直接联系调度员 ; 不选择,司机直接联系您',
@ -186,7 +186,7 @@ export class SupplyManagementBulkPublishComponent implements OnInit {
} as SFSelectWidgetSchema } as SFSelectWidgetSchema
} }
}, },
required: ['shipperAppUserId', 'enterpriseProjectId','enterpriseInfoId', 'deadlineTime', ] required: ['shipperAppUserId', 'enterpriseProjectId', 'enterpriseInfoId', 'deadlineTime']
}; };
this.ui1 = { this.ui1 = {
'*': { '*': {
@ -497,7 +497,7 @@ export class SupplyManagementBulkPublishComponent implements OnInit {
} as SFTextareaWidgetSchema } as SFTextareaWidgetSchema
} }
}, },
required: ['paymentDays','stateReceipt'] required: ['paymentDays', 'stateReceipt']
}; };
this.ui7 = { this.ui7 = {
'*': { '*': {
@ -507,27 +507,32 @@ export class SupplyManagementBulkPublishComponent implements OnInit {
}; };
} }
changeValue() { changeValue() {
this.totalFees = Number(this.sf7?.value?.appendFee) + Number(this.sf7?.value?.oilCardPay) + Number(this.sf7?.value?.prePay) + Number(this.sf7?.value?.receiptPay) + Number(this.sf7?.value?.toPay) this.totalFees =
Number(this.sf7?.value?.appendFee) +
Number(this.sf7?.value?.oilCardPay) +
Number(this.sf7?.value?.prePay) +
Number(this.sf7?.value?.receiptPay) +
Number(this.sf7?.value?.toPay);
} }
// 获取城市列表 // 获取城市列表
getRegionCode(regionCode: any) { getRegionCode(regionCode: any) {
return this.service return this.service
.request(this.service.$api_get_enterprise_project, { id: regionCode }) .request(this.service.$api_get_enterprise_project, { id: regionCode })
.pipe( .pipe(
map(res => map(res =>
res.map((item: any) => ({ res.map((item: any) => ({
label: item.projectName, label: item.projectName,
value: item.id value: item.id
})) }))
)
) )
.subscribe(res => { )
this.sf1.getProperty('/enterpriseProjectId')!.schema.enum = res; .subscribe(res => {
this.sf1.getProperty('/enterpriseProjectId')!.widget.reset(res); this.sf1.getProperty('/enterpriseProjectId')!.schema.enum = res;
if(this.enterpriseProjectIds) { this.sf1.getProperty('/enterpriseProjectId')!.widget.reset(res);
this.sf1.setValue('/enterpriseProjectId', this.enterpriseProjectIds); if (this.enterpriseProjectIds) {
} this.sf1.setValue('/enterpriseProjectId', this.enterpriseProjectIds);
}); }
});
} }
addStartInfo(event: any) { addStartInfo(event: any) {
if (this.startInfo.length < 5) { if (this.startInfo.length < 5) {
@ -548,10 +553,9 @@ export class SupplyManagementBulkPublishComponent implements OnInit {
this.validateForm1.addControl(`loadPhone${controlId}`, new FormControl(null, Validators.required)); this.validateForm1.addControl(`loadPhone${controlId}`, new FormControl(null, Validators.required));
} }
} }
subStartInfo(event: any, index: number, id?:any) { subStartInfo(event: any, index: number, id?: any) {
if(id) { if (id) {
this.service.request(this.service.$api_delete_Wholedeletebatch, [id]).subscribe((res) => { this.service.request(this.service.$api_delete_Wholedeletebatch, [id]).subscribe(res => {});
})
} }
this.startInfo.splice(index, 1); this.startInfo.splice(index, 1);
this.validateForm1.removeControl(`loadAddress${index}`); this.validateForm1.removeControl(`loadAddress${index}`);
@ -577,13 +581,12 @@ export class SupplyManagementBulkPublishComponent implements OnInit {
this.validateForm1.addControl(`unloadPhone${controlId}`, new FormControl(null, Validators.required)); this.validateForm1.addControl(`unloadPhone${controlId}`, new FormControl(null, Validators.required));
} }
} }
subEndInfo(event: any, index: number, id?:any) { subEndInfo(event: any, index: number, id?: any) {
if(id) { if (id) {
this.service.request(this.service.$api_delete_Wholedeletebatch, [id]).subscribe((res) => { this.service.request(this.service.$api_delete_Wholedeletebatch, [id]).subscribe(res => {});
})
} }
this.endInfo.splice(index, 1); this.endInfo.splice(index, 1);
this.validateForm1.removeControl(`unloadAddress${index}`); this.validateForm1.removeControl(`unloadAddress${index}`);
this.validateForm1.removeControl(`unloadName${index}`); this.validateForm1.removeControl(`unloadName${index}`);
this.validateForm1.removeControl(`unloadPhone${index}`); this.validateForm1.removeControl(`unloadPhone${index}`);
} }
@ -596,7 +599,7 @@ export class SupplyManagementBulkPublishComponent implements OnInit {
submitParams: item, submitParams: item,
submitUrl: this.service.$api_save_bulk_assign submitUrl: this.service.$api_save_bulk_assign
}, },
nzWidth: 1300, nzWidth: 1300
}); });
modalRef.afterClose.subscribe(result => { modalRef.afterClose.subscribe(result => {
if (result) { if (result) {
@ -606,16 +609,16 @@ export class SupplyManagementBulkPublishComponent implements OnInit {
} }
// 打开下单完成页面 // 打开下单完成页面
openFinishPage(resourceObj: any = null) { openFinishPage(resourceObj: any = null) {
this.modalService.create({ this.modalService.create({
nzTitle: '', nzTitle: '',
nzContent: PublishSuccessComponent, nzContent: PublishSuccessComponent,
nzWidth: 900, nzWidth: 900,
nzFooter: null, nzFooter: null,
nzComponentParams: { type: 'bulk' } nzComponentParams: { type: 'bulk' }
}); });
} }
// 确认提交 // 提交前确认,委托运输协议弹窗
submit(submitType?: string): void { submitConfirm(submitType?: any) {
// 校验规则 // 校验规则
Object.keys(this.validateForm1.controls).forEach(key => { Object.keys(this.validateForm1.controls).forEach(key => {
this.validateForm1.controls[key].markAsDirty(); this.validateForm1.controls[key].markAsDirty();
@ -625,40 +628,58 @@ export class SupplyManagementBulkPublishComponent implements OnInit {
this.sf3.validator({ emitError: true }); this.sf3.validator({ emitError: true });
this.sf4.validator({ emitError: true }); this.sf4.validator({ emitError: true });
this.sf7.validator({ emitError: true }); this.sf7.validator({ emitError: true });
if (this.validateForm1.invalid || !this.sf3.valid || !this.sf1.valid|| !this.sf4.valid || !this.sf7.valid) { if (this.validateForm1.invalid || !this.sf3.valid || !this.sf1.valid || !this.sf4.valid || !this.sf7.valid) {
return; return;
} }
if(typeof(this.validateForm1.value.modifyTime) !== 'string' ) {
const modalRef = this.modalService.create({
nzTitle: '运输协议',
nzContent: TranAgreementComponent,
nzWidth: 900,
nzFooter: null
});
modalRef.afterClose.subscribe(result => {
if (result) {
this.submit(submitType);
}
});
}
// 确认提交
submit(submitType?: string): void {
if (typeof this.validateForm1.value.modifyTime !== 'string') {
var c = new Date(this.validateForm1.value.modifyTime); var c = new Date(this.validateForm1.value.modifyTime);
this.validateForm1.value.modifyTime = c.getFullYear() + '-' + (c.getMonth() + 1) + '-' + c.getDate() + ' ' + c.getHours() + ':' + c.getMinutes() + ':' + c.getSeconds() this.validateForm1.value.modifyTime =
c.getFullYear() + '-' + (c.getMonth() + 1) + '-' + c.getDate() + ' ' + c.getHours() + ':' + c.getMinutes() + ':' + c.getSeconds();
} }
if(typeof(this.validateForm1.value.createTime) !== 'string' ) { if (typeof this.validateForm1.value.createTime !== 'string') {
var c = new Date(this.validateForm1.value.createTime); var c = new Date(this.validateForm1.value.createTime);
this.validateForm1.value.createTime = c.getFullYear() + '-' + (c.getMonth() + 1) + '-' + c.getDate() + ' ' + c.getHours() + ':' + c.getMinutes() + ':' + c.getSeconds() this.validateForm1.value.createTime =
c.getFullYear() + '-' + (c.getMonth() + 1) + '-' + c.getDate() + ' ' + c.getHours() + ':' + c.getMinutes() + ':' + c.getSeconds();
} }
const params: any = { const params: any = {
...this.sf1.value, ...this.sf1.value,
...this.sf7.value, ...this.sf7.value,
unLoadingPlaceDTOList: [...this.startInfo, ...this.endInfo,], unLoadingPlaceDTOList: [...this.startInfo, ...this.endInfo],
goodsInfoDTOList: [ goodsInfoDTOList: [
{ {
...this.sf4.value, ...this.sf3.value, ...this.sf4.value,
maxWeight: this.sf4.value.maxWeight.join(','), ...this.sf3.value,
maxCube: this.sf4.value.maxCube.join(',') maxWeight: this.sf4.value.maxWeight.join(','),
} maxCube: this.sf4.value.maxCube.join(',')
}
] ]
} };
params.freightPrice = this.totalFees params.freightPrice = this.totalFees;
if(submitType) { if (submitType) {
if (submitType == 'assign') { if (submitType == 'assign') {
this.chooseFamifiar(params); this.chooseFamifiar(params);
return; return;
} }
} }
if(this.PageStatus === '大宗修改') { if (this.PageStatus === '大宗修改') {
this.requests(this.service.$api_set_bulkModify, params, 1); this.requests(this.service.$api_set_bulkModify, params, 1);
} else if(this.PageStatus === '大宗下一单') { } else if (this.PageStatus === '大宗下一单') {
this.requests(this.service.$api_set_saveAnotherBulkOrder, params, 2); this.requests(this.service.$api_set_saveAnotherBulkOrder, params, 2);
} }
} }
@ -695,8 +716,8 @@ export class SupplyManagementBulkPublishComponent implements OnInit {
if (res) { if (res) {
this.sf3.getProperty('/goodsNameId')!.schema.enum = res; this.sf3.getProperty('/goodsNameId')!.schema.enum = res;
this.sf3.getProperty('/goodsNameId')!.widget.reset(res); this.sf3.getProperty('/goodsNameId')!.widget.reset(res);
if(this.sf3data.goodsNameId){ if (this.sf3data.goodsNameId) {
this.sf3.setValue('/goodsNameId',this.sf3data.goodsNameId); this.sf3.setValue('/goodsNameId', this.sf3data.goodsNameId);
} }
} }
}); });
@ -713,64 +734,64 @@ export class SupplyManagementBulkPublishComponent implements OnInit {
this.sf7.setValue('/receiptAddressId', data.id); this.sf7.setValue('/receiptAddressId', data.id);
this.sf7.setValue('/receiptUserName', data.contactName); this.sf7.setValue('/receiptUserName', data.contactName);
this.sf7.setValue('/phon', data.contactTelephone); this.sf7.setValue('/phon', data.contactTelephone);
this.sf7.setValue('/area', `${data.province}-${data.city}-${data.area}`) this.sf7.setValue('/area', `${data.province}-${data.city}-${data.area}`);
this.sf7.setValue('/address', data.detailedAddress); this.sf7.setValue('/address', data.detailedAddress);
} }
}); });
} }
// 打开地图 // 打开地图
openMap(type: string, index: number) { openMap(type: string, index: number) {
const modalRef = this.modalService.create({ const modalRef = this.modalService.create({
nzTitle: '', nzTitle: '',
nzContent: AmapPoiPickerComponent, nzContent: AmapPoiPickerComponent,
nzWidth: 900, nzWidth: 900,
nzOnOk: item => { nzOnOk: item => {
const poi = item.poi; const poi = item.poi;
const locList = poi.location.toString().split(','); const locList = poi.location.toString().split(',');
switch (type) { switch (type) {
case 'start': case 'start':
this.startInfo[index].detailedAddress = poi.district + poi.name; this.startInfo[index].detailedAddress = poi.district + poi.name;
this.startInfo[index].longitude = locList[0]; this.startInfo[index].longitude = locList[0];
this.startInfo[index].latitude = locList[1]; this.startInfo[index].latitude = locList[1];
this.startInfo[index].province = poi.cityInfo.province; this.startInfo[index].province = poi.cityInfo.province;
this.startInfo[index].city = poi.cityInfo.city; this.startInfo[index].city = poi.cityInfo.city;
this.startInfo[index].area = poi.cityInfo.district; this.startInfo[index].area = poi.cityInfo.district;
this.startInfo[index].address = poi.name; this.startInfo[index].address = poi.name;
break; break;
case 'end': case 'end':
this.endInfo[index].detailedAddress = poi.district + poi.name; this.endInfo[index].detailedAddress = poi.district + poi.name;
this.endInfo[index].longitude = locList[0]; this.endInfo[index].longitude = locList[0];
this.endInfo[index].latitude = locList[1]; this.endInfo[index].latitude = locList[1];
this.endInfo[index].province = poi.cityInfo.province; this.endInfo[index].province = poi.cityInfo.province;
this.endInfo[index].city = poi.cityInfo.city; this.endInfo[index].city = poi.cityInfo.city;
this.endInfo[index].area = poi.cityInfo.district; this.endInfo[index].area = poi.cityInfo.district;
this.endInfo[index].address = poi.name; this.endInfo[index].address = poi.name;
break; break;
default: default:
break; break;
} }
if (this.startInfo[0]?.area && this.endInfo[0]?.area) { if (this.startInfo[0]?.area && this.endInfo[0]?.area) {
this.amapService.drivingCompute([...this.startInfo], [...this.endInfo]).subscribe((res: any) => { this.amapService.drivingCompute([...this.startInfo], [...this.endInfo]).subscribe((res: any) => {
this.totalDistance = res.distance; this.totalDistance = res.distance;
this.totalTime = res.time; this.totalTime = res.time;
}); });
}
} }
} });
}); }
}
goBack() { goBack() {
window.history.go(-1); window.history.go(-1);
} }
// 初始化信息 // 初始化信息
initdata() { initdata() {
this.service.request(`${this.service.$api_get_getBulkDetail}`, {id:this.id}).subscribe((res) => { this.service.request(`${this.service.$api_get_getBulkDetail}`, { id: this.id }).subscribe(res => {
this.dataR(res); this.dataR(res);
}) });
} }
// 初始化信息 // 初始化信息
dataR (res: any) { dataR(res: any) {
// 注:区分编辑和下一单 区别是初始化的时候加不加ID // 注:区分编辑和下一单 区别是初始化的时候加不加ID
if (res?.shipperAppUserName) { if (res?.shipperAppUserName) {
const List: any = []; const List: any = [];
@ -786,26 +807,26 @@ export class SupplyManagementBulkPublishComponent implements OnInit {
} }
}); });
} }
if(res?.enterpriseProjectId) { if (res?.enterpriseProjectId) {
this.enterpriseProjectIds = res.enterpriseProjectId this.enterpriseProjectIds = res.enterpriseProjectId;
} }
this.sf1data = { this.sf1data = {
dispatchPhone: res?.dispatchPhone, dispatchPhone: res?.dispatchPhone,
dispatchName: res?.dispatchName, dispatchName: res?.dispatchName,
// shipperAppUserName: res?.shipperAppUserName || '', // shipperAppUserName: res?.shipperAppUserName || '',
enterpriseProjectId: res?.enterpriseProjectId || '', enterpriseProjectId: res?.enterpriseProjectId || '',
enterpriseInfoName: res?.enterpriseInfoName || '', enterpriseInfoName: res?.enterpriseInfoName || '',
externalResourceCode: res?.externalResourceCode || '', externalResourceCode: res?.externalResourceCode || '',
dispatchId: res?.dispatchId || '', dispatchId: res?.dispatchId || '',
deadlineTime: res?.deadlineTime || '', deadlineTime: res?.deadlineTime || ''
} };
if(this.PageStatus === '大宗修改') { if (this.PageStatus === '大宗修改') {
this.sf1data.id = res?.id; this.sf1data.id = res?.id;
} }
res?.unLoadingPlaceVOList.forEach((element: any) => { res?.unLoadingPlaceVOList.forEach((element: any) => {
if(element.type === 1 || element.type === '1') { if (element.type === 1 || element.type === '1') {
const controlId = this.startInfo.length; const controlId = this.startInfo.length;
if(this.PageStatus === '大宗修改') { if (this.PageStatus === '大宗修改') {
this.startInfo.push({ this.startInfo.push({
detailedAddress: element.detailedAddress, detailedAddress: element.detailedAddress,
appUserName: element.appUserName, appUserName: element.appUserName,
@ -817,7 +838,7 @@ export class SupplyManagementBulkPublishComponent implements OnInit {
area: element.area, area: element.area,
type: element.type, type: element.type,
id: element.id id: element.id
}) });
} else { } else {
this.startInfo.push({ this.startInfo.push({
detailedAddress: element.detailedAddress, detailedAddress: element.detailedAddress,
@ -828,19 +849,19 @@ export class SupplyManagementBulkPublishComponent implements OnInit {
province: element.province, province: element.province,
city: element.city, city: element.city,
area: element.area, area: element.area,
type: element.type, type: element.type
}) });
} }
if(element.createTime) { if (element.createTime) {
this.creatTime = element?.createTime this.creatTime = element?.createTime;
this.modifyTime = element?.modifyTime this.modifyTime = element?.modifyTime;
} }
this.validateForm1.addControl(`loadAddress${controlId}`, new FormControl(null, Validators.required)); this.validateForm1.addControl(`loadAddress${controlId}`, new FormControl(null, Validators.required));
this.validateForm1.addControl(`loadName${controlId}`, new FormControl(null, Validators.required)); this.validateForm1.addControl(`loadName${controlId}`, new FormControl(null, Validators.required));
this.validateForm1.addControl(`loadPhone${controlId}`, new FormControl(null, Validators.required)); this.validateForm1.addControl(`loadPhone${controlId}`, new FormControl(null, Validators.required));
} else if(element.type === 2 || element.type === '2') { } else if (element.type === 2 || element.type === '2') {
const controlId = this.endInfo.length; const controlId = this.endInfo.length;
if( this.PageStatus === '大宗修改') { if (this.PageStatus === '大宗修改') {
this.endInfo.push({ this.endInfo.push({
detailedAddress: element?.detailedAddress, detailedAddress: element?.detailedAddress,
appUserName: element?.appUserName, appUserName: element?.appUserName,
@ -852,7 +873,7 @@ export class SupplyManagementBulkPublishComponent implements OnInit {
area: element.area, area: element.area,
type: element.type, type: element.type,
id: element.id id: element.id
}) });
} else { } else {
this.endInfo.push({ this.endInfo.push({
detailedAddress: element?.detailedAddress, detailedAddress: element?.detailedAddress,
@ -864,7 +885,7 @@ export class SupplyManagementBulkPublishComponent implements OnInit {
city: element.city, city: element.city,
area: element.area, area: element.area,
type: element.type type: element.type
}) });
} }
this.validateForm1.addControl(`unloadAddress${controlId}`, new FormControl(null, Validators.required)); this.validateForm1.addControl(`unloadAddress${controlId}`, new FormControl(null, Validators.required));
this.validateForm1.addControl(`unloadName${controlId}`, new FormControl(null, Validators.required)); this.validateForm1.addControl(`unloadName${controlId}`, new FormControl(null, Validators.required));
@ -875,7 +896,7 @@ export class SupplyManagementBulkPublishComponent implements OnInit {
goodsTypeId: res?.goodsInfoVOList[0]?.goodsTypeId || '', goodsTypeId: res?.goodsInfoVOList[0]?.goodsTypeId || '',
goodsTypeName: res?.goodsInfoVOList[0]?.goodsTypeName || '', goodsTypeName: res?.goodsInfoVOList[0]?.goodsTypeName || '',
goodsNameId: res?.goodsInfoVOList[0]?.goodsNameId || '', goodsNameId: res?.goodsInfoVOList[0]?.goodsNameId || '',
goodsName: res?.goodsInfoVOList[0]?.goodsName || '', goodsName: res?.goodsInfoVOList[0]?.goodsName || ''
}; };
if (this.sf3data.goodsTypeName === '其它') { if (this.sf3data.goodsTypeName === '其它') {
this.sf3data.goodsName1 = res?.goodsInfoVOList[0]?.goodsName || ''; this.sf3data.goodsName1 = res?.goodsInfoVOList[0]?.goodsName || '';
@ -892,11 +913,10 @@ export class SupplyManagementBulkPublishComponent implements OnInit {
number: res?.goodsInfoVOList[0]?.number || '', number: res?.goodsInfoVOList[0]?.number || '',
maxWeight: res?.goodsInfoVOList[0]?.maxWeight?.split(',') || '', maxWeight: res?.goodsInfoVOList[0]?.maxWeight?.split(',') || '',
maxCube: res?.goodsInfoVOList[0]?.maxCube?.split(',') || '' maxCube: res?.goodsInfoVOList[0]?.maxCube?.split(',') || ''
};
} if (this.PageStatus === '大宗修改') {
if(this.PageStatus === '大宗修改') {
this.sf4data.id = res?.goodsInfoVOList[0]?.id; this.sf4data.id = res?.goodsInfoVOList[0]?.id;
} }
this.totalFees = res?.freightPrice || '0'; this.totalFees = res?.freightPrice || '0';
this.sf7data = { this.sf7data = {
stateReceipt: res?.supplementaryInformationVO?.stateReceipt, stateReceipt: res?.supplementaryInformationVO?.stateReceipt,
@ -911,7 +931,7 @@ export class SupplyManagementBulkPublishComponent implements OnInit {
}; };
} }
// 回退 // 回退
choose(){ choose() {
window.history.go(-1); window.history.go(-1);
} }
// 选择地址 // 选择地址

View File

@ -17,7 +17,9 @@
</nz-card> </nz-card>
<nz-card> <nz-card>
<div class="card-title">装卸货信息<span class="tip-font">预计公里数:{{ totalDistance }}km预计行程耗时{{ totalTime }}小时</span></div> <div class="card-title"
>装卸货信息<span class="tip-font">预计公里数:{{ totalDistance }}km预计行程耗时{{ totalTime }}小时</span></div
>
<form #ngForm="ngForm" nz-form role="form"> <form #ngForm="ngForm" nz-form role="form">
<div nz-row [nzGutter]="24"> <div nz-row [nzGutter]="24">
@ -28,24 +30,44 @@
<nz-form-control [nzErrorTip]="'请输入装货地'"> <nz-form-control [nzErrorTip]="'请输入装货地'">
<div class="align-center"> <div class="align-center">
<nz-input-group [nzSuffix]="endInconTemp1"> <nz-input-group [nzSuffix]="endInconTemp1">
<input nz-input [(ngModel)]="data1.detailedAddress" (click)="openMap('start', idx)" <input
name="startDetailedAddress{{ idx }}" placeholder="请输入装货地" required /> nz-input
[(ngModel)]="data1.detailedAddress"
(click)="openMap('start', idx)"
name="startDetailedAddress{{ idx }}"
placeholder="请输入装货地"
required
/>
</nz-input-group> </nz-input-group>
<span style="padding: 0 10px"><i nz-icon nzType="menu" nzTheme="outline" style="color: #1890ff" <span style="padding: 0 10px"
(click)="chooseAddress(idx, 'start')"></i></span> ><i nz-icon nzType="menu" nzTheme="outline" style="color: #1890ff" (click)="chooseAddress(idx, 'start')"></i
></span>
</div> </div>
</nz-form-control> </nz-form-control>
</nz-form-item> </nz-form-item>
<nz-form-item> <nz-form-item>
<nz-form-label [nzSpan]="4" nzRequired>联系人</nz-form-label> <nz-form-label [nzSpan]="4" nzRequired>联系人</nz-form-label>
<div class="align-center"> <div style="display: flex">
<nz-form-control [nzErrorTip]="'请输入联系人姓名'"> <nz-form-control [nzErrorTip]="'请输入联系人姓名'">
<input nz-input [(ngModel)]="data1.appUserName" name="startAppUserName{{ idx }}" maxlength="30" <input
placeholder="请输入联系人姓名" required /> nz-input
[(ngModel)]="data1.appUserName"
name="startAppUserName{{ idx }}"
maxlength="30"
placeholder="请输入联系人姓名"
required
/>
</nz-form-control> </nz-form-control>
<nz-form-control [nzErrorTip]="'请输入联系人电话'"> <nz-form-control [nzErrorTip]="'请输入联系人电话'">
<input style="margin-left: 12px" nz-input [(ngModel)]="data1.contractTelephone" maxlength="11" <input
name="startContractTelephone{{ idx }}" placeholder="请输入联系人电话" required/> style="margin-left: 12px"
nz-input
[(ngModel)]="data1.contractTelephone"
maxlength="11"
name="startContractTelephone{{ idx }}"
placeholder="请输入联系人电话"
required
/>
</nz-form-control> </nz-form-control>
</div> </div>
</nz-form-item> </nz-form-item>
@ -53,8 +75,7 @@
</div> </div>
<div nz-col [nzSpan]="4"> <div nz-col [nzSpan]="4">
<div style="display: flex; justify-content: center"> <div style="display: flex; justify-content: center">
<span style="padding: 24 px; font-size: 30px; color: #7d7d7d"><i nz-icon nzType="swap" <span style="padding: 24 px; font-size: 30px; color: #7d7d7d"><i nz-icon nzType="swap" nzTheme="outline"></i></span>
nzTheme="outline"></i></span>
</div> </div>
</div> </div>
<div nz-col [nzSpan]="10"> <div nz-col [nzSpan]="10">
@ -64,24 +85,44 @@
<nz-form-control [nzErrorTip]="'请输入卸货地'"> <nz-form-control [nzErrorTip]="'请输入卸货地'">
<div class="align-center"> <div class="align-center">
<nz-input-group [nzSuffix]="endInconTemp1"> <nz-input-group [nzSuffix]="endInconTemp1">
<input nz-input [(ngModel)]="data2.detailedAddress" (click)="openMap('end', idx)" <input
name="endDetailedAddress{{ idx }}" placeholder="请输入卸货地" required/> nz-input
[(ngModel)]="data2.detailedAddress"
(click)="openMap('end', idx)"
name="endDetailedAddress{{ idx }}"
placeholder="请输入卸货地"
required
/>
</nz-input-group> </nz-input-group>
<span style="padding: 0 10px"><i nz-icon nzType="menu" nzTheme="outline" style="color: #1890ff" <span style="padding: 0 10px"
(click)="chooseAddress(idx, 'end')"></i></span> ><i nz-icon nzType="menu" nzTheme="outline" style="color: #1890ff" (click)="chooseAddress(idx, 'end')"></i
></span>
</div> </div>
</nz-form-control> </nz-form-control>
</nz-form-item> </nz-form-item>
<nz-form-item> <nz-form-item>
<nz-form-label [nzSpan]="4" nzRequired>联系人</nz-form-label> <nz-form-label [nzSpan]="4" nzRequired>联系人</nz-form-label>
<div class="align-center"> <div style="display: flex">
<nz-form-control [nzErrorTip]="'请输入联系人姓名'"> <nz-form-control [nzErrorTip]="'请输入联系人姓名'">
<input nz-input [(ngModel)]="data2.appUserName" maxlength="30" name="endAppUserName{{ idx }}" <input
placeholder="请输入联系人姓名" required/> nz-input
[(ngModel)]="data2.appUserName"
maxlength="30"
name="endAppUserName{{ idx }}"
placeholder="请输入联系人姓名"
required
/>
</nz-form-control> </nz-form-control>
<nz-form-control [nzErrorTip]="'请输入联系人电话'"> <nz-form-control [nzErrorTip]="'请输入联系人电话'">
<input style="margin-left: 12px" nz-input [(ngModel)]="data2.contractTelephone" <input
name="endUnloadPhone{{ idx }}" maxlength="11" placeholder="请输入联系人电话" required/> style="margin-left: 12px"
nz-input
[(ngModel)]="data2.contractTelephone"
name="endUnloadPhone{{ idx }}"
maxlength="11"
placeholder="请输入联系人电话"
required
/>
</nz-form-control> </nz-form-control>
</div> </div>
</nz-form-item> </nz-form-item>
@ -100,12 +141,20 @@
<sf #sf4 [schema]="schema4" [button]="'none'" [ui]="ui4" [formData]="sf4data"> <sf #sf4 [schema]="schema4" [button]="'none'" [ui]="ui4" [formData]="sf4data">
<ng-template sf-template="freightPrice" let-i let-ui="ui"> <ng-template sf-template="freightPrice" let-i let-ui="ui">
<nz-input-group [nzAddOnAfter]="addOnAfterTemplate"> <nz-input-group [nzAddOnAfter]="addOnAfterTemplate">
<input nz-input [ngModel]="i.value" (ngModelChange)="i.setValue($event)" placeholder="请输入" /> <input
nz-input
type="number"
min="0"
step="0.01"
[ngModel]="i.value"
(ngModelChange)="i.setValue($event)"
placeholder="请输入"
oninput="if(value>99999)value=99999;if(value<0)value=0"
/>
</nz-input-group> </nz-input-group>
<ng-template #addOnAfterTemplate> <ng-template #addOnAfterTemplate>
<nz-select [ngModel]="sf4.value.freightType" (ngModelChange)="sf4.setValue('/freightType', $event)"> <nz-select [ngModel]="sf4.value.freightType" (ngModelChange)="sf4.setValue('/freightType', $event)">
<nz-option [nzValue]="item.value" [nzLabel]="item.label" *ngFor="let item of freightTypeOptions"> <nz-option [nzValue]="item.value" [nzLabel]="item.label" *ngFor="let item of freightTypeOptions"></nz-option>
</nz-option>
</nz-select> </nz-select>
</ng-template> </ng-template>
</ng-template> </ng-template>
@ -116,8 +165,9 @@
<nz-option nzLabel="抹除小数" nzValue="2"></nz-option> <nz-option nzLabel="抹除小数" nzValue="2"></nz-option>
<nz-option nzLabel="抹除个数" nzValue="3"></nz-option> <nz-option nzLabel="抹除个数" nzValue="3"></nz-option>
</nz-select> </nz-select>
<span style="padding: 0 12px" nz-tooltip [nzTooltipTitle]="template2" nzTooltipPlacement="bottom"><i nz-icon <span style="padding: 0 12px" nz-tooltip [nzTooltipTitle]="template2" nzTooltipPlacement="bottom"
nzType="exclamation-circle" nzTheme="outline" style="color: #1890ff"></i></span> ><i nz-icon nzType="exclamation-circle" nzTheme="outline" style="color: #1890ff"></i
></span>
<ng-template #template2> <ng-template #template2>
<p>例如 付司机运费 = 重量*单价 = 999.99</p> <p>例如 付司机运费 = 重量*单价 = 999.99</p>
<p>保留小数,即 999.99</p> <p>保留小数,即 999.99</p>
@ -128,20 +178,41 @@
</ng-template> </ng-template>
<ng-template sf-template="weight" let-i let-ui="ui"> <ng-template sf-template="weight" let-i let-ui="ui">
<nz-input-group [nzAddOnAfter]="''"> <nz-input-group [nzAddOnAfter]="''">
<input nz-input type="number" [ngModel]="i.value" min="0" step="0.01" (ngModelChange)="i.setValue($event)" <input
placeholder="总重量,必填" /> nz-input
type="number"
[ngModel]="i.value"
min="0"
step="0.01"
(ngModelChange)="i.setValue($event)"
placeholder="总重量,必填"
/>
</nz-input-group> </nz-input-group>
</ng-template> </ng-template>
<ng-template sf-template="volume" let-i let-ui="ui"> <ng-template sf-template="volume" let-i let-ui="ui">
<nz-input-group [nzAddOnAfter]="''"> <nz-input-group [nzAddOnAfter]="''">
<input nz-input type="number" [ngModel]="i.value" min="0" step="0.01" (ngModelChange)="i.setValue($event)" <input
placeholder="总体积" /> nz-input
type="number"
[ngModel]="i.value"
min="0"
step="0.01"
(ngModelChange)="i.setValue($event)"
placeholder="总体积"
/>
</nz-input-group> </nz-input-group>
</ng-template> </ng-template>
<ng-template sf-template="number" let-i let-ui="ui"> <ng-template sf-template="number" let-i let-ui="ui">
<nz-input-group [nzAddOnAfter]="''"> <nz-input-group [nzAddOnAfter]="''">
<input nz-input type="number" [ngModel]="i.value" min="0" step="0.01" (ngModelChange)="i.setValue($event)" <input
placeholder="总车次" /> nz-input
type="number"
[ngModel]="i.value"
min="0"
step="0.01"
(ngModelChange)="i.setValue($event)"
placeholder="总车次"
/>
</nz-input-group> </nz-input-group>
</ng-template> </ng-template>
</sf> </sf>
@ -165,12 +236,18 @@
</ng-template> </ng-template>
<ng-template sf-template="paymentDays" let-i let-ui="ui"> <ng-template sf-template="paymentDays" let-i let-ui="ui">
<div nz-row> <div nz-row>
<div class="align-center2" style="width: 350px;"> <div class="align-center2" style="width: 350px">
<div nz-col nzSpan="12"> <div nz-col nzSpan="12">
<nz-input-number [ngModel]="i.value" [nzMin]="1" [nzMax]="30" [nzStep]="1" <nz-input-number
(ngModelChange)="i.setValue($event)" nzPlaceHolder="请输入1-30"></nz-input-number> [ngModel]="i.value"
[nzMin]="1"
[nzMax]="30"
[nzStep]="1"
(ngModelChange)="i.setValue($event)"
nzPlaceHolder="请输入1-30"
></nz-input-number>
</div> </div>
<div > <div>
<span>&nbsp;&nbsp; 天内支付运费</span> <span>&nbsp;&nbsp; 天内支付运费</span>
</div> </div>
</div> </div>
@ -185,7 +262,7 @@
<div class="align-center"> <div class="align-center">
<!-- <button nz-button nzType="primary" (click)="choose()">取消</button> --> <!-- <button nz-button nzType="primary" (click)="choose()">取消</button> -->
<!-- <button nz-button nzType="primary" (click)="submit('assign')">生成二维码</button> --> <!-- <button nz-button nzType="primary" (click)="submit('assign')">生成二维码</button> -->
<button nz-button nzType="primary" (click)="submit('assign')">指派熟车</button> <button nz-button nzType="primary" (click)="submitConfirm('assign')">指派熟车</button>
<button nz-button nzType="primary" style="margin-left: 48px" (click)="submit('publish')">司机抢单</button> <button nz-button nzType="primary" style="margin-left: 48px" (click)="submitConfirm('publish')">司机抢单</button>
</div> </div>
</nz-card> </nz-card>

View File

@ -19,6 +19,7 @@ import { SupplyManagementService } from '../../services/supply-management.servic
import { PublishGoodsChooseFamifiarComponent } from '../choose-famifiar/choose-famifiar.component'; import { PublishGoodsChooseFamifiarComponent } from '../choose-famifiar/choose-famifiar.component';
import { PublishAddressListComponent } from '../onecar-publish/address-list/address-list.component'; import { PublishAddressListComponent } from '../onecar-publish/address-list/address-list.component';
import { PublishSuccessComponent } from '../onecar-publish/publish-success/publish-success.component'; import { PublishSuccessComponent } from '../onecar-publish/publish-success/publish-success.component';
import { TranAgreementComponent } from '../tran-agreement/tran-agreement.component';
@Component({ @Component({
selector: 'app-publish-goods-bulk-publish', selector: 'app-publish-goods-bulk-publish',
templateUrl: './bulk-release-publish.component.html', templateUrl: './bulk-release-publish.component.html',
@ -53,7 +54,9 @@ export class SupplyManagementBulkReleasePublishComponent implements OnInit {
private route: ActivatedRoute, private route: ActivatedRoute,
private amapService: AmapService, private amapService: AmapService,
public shipperSrv: ShipperBaseService public shipperSrv: ShipperBaseService
) {} ) {
}
@ViewChild('sf1', { static: false }) sf1!: SFComponent; @ViewChild('sf1', { static: false }) sf1!: SFComponent;
schema1: SFSchema = {}; schema1: SFSchema = {};
ui1!: SFUISchema; ui1!: SFUISchema;
@ -114,6 +117,7 @@ export class SupplyManagementBulkReleasePublishComponent implements OnInit {
serverSearch: true, serverSearch: true,
searchDebounceTime: 300, searchDebounceTime: 300,
searchLoadingText: '搜索中...', searchLoadingText: '搜索中...',
allowClear: true,
onSearch: (q: any) => { onSearch: (q: any) => {
if (!!q) { if (!!q) {
return this.service return this.service
@ -135,7 +139,7 @@ export class SupplyManagementBulkReleasePublishComponent implements OnInit {
ui: { ui: {
widget: 'select', widget: 'select',
placeholder: '请选择', placeholder: '请选择',
allowClear: true allowClear: true,
} as SFSelectWidgetSchema } as SFSelectWidgetSchema
}, },
// enterpriseInfoName: { // enterpriseInfoName: {
@ -161,6 +165,7 @@ export class SupplyManagementBulkReleasePublishComponent implements OnInit {
type: 'string', type: 'string',
format: 'date-time', format: 'date-time',
ui: { ui: {
placeholder: '请输入', placeholder: '请输入',
format: 'yyyy-MM-dd HH:mm:ss' format: 'yyyy-MM-dd HH:mm:ss'
} }
@ -569,19 +574,35 @@ export class SupplyManagementBulkReleasePublishComponent implements OnInit {
nzComponentParams: { type: 'bulk' } nzComponentParams: { type: 'bulk' }
}); });
} }
// 提交前确认,委托运输协议弹窗
submitConfirm(submitType?: any) {
// 校验规则
Object.keys(this.ngForm.form.controls).forEach(key => {
this.ngForm.form.controls[key].markAsDirty();
this.ngForm.form.controls[key].updateValueAndValidity();
});
this.sf1.validator({ emitError: true });
this.sf3.validator({ emitError: true });
this.sf4.validator({ emitError: true });
this.sf6.validator({ emitError: true });
if (this.ngForm.form.invalid || !this.sf1.valid || !this.sf3.valid || !this.sf4.valid || !this.sf6.valid) {
return;
}
const modalRef = this.modalService.create({
nzTitle: '运输协议',
nzContent: TranAgreementComponent,
nzWidth: 900,
nzFooter: null
});
modalRef.afterClose.subscribe(result => {
if (result) {
this.submit(submitType);
}
});
}
// 确认提交(下单) // 确认提交(下单)
submit(submitType: string): void { submit(submitType: string): void {
Object.keys(this.ngForm.form.controls).forEach(key => {
this.ngForm.form.controls[key].markAsDirty();
this.ngForm.form.controls[key].updateValueAndValidity();
});
this.sf1.validator({ emitError: true });
this.sf3.validator({ emitError: true });
this.sf4.validator({ emitError: true });
this.sf6.validator({ emitError: true });
if (this.ngForm.form.invalid || !this.sf1.valid || !this.sf3.valid || !this.sf4.valid || !this.sf6.valid) {
return;
}
// //装卸货信息 // //装卸货信息
const LoadingList = this.startInfo.concat(this.endInfo); const LoadingList = this.startInfo.concat(this.endInfo);
// 货物信息 // 货物信息

View File

@ -42,7 +42,7 @@
</nz-form-item> </nz-form-item>
<nz-form-item> <nz-form-item>
<nz-form-label [nzSpan]="4" nzRequired>联系人</nz-form-label> <nz-form-label [nzSpan]="4" nzRequired>联系人</nz-form-label>
<nz-form-control [nzErrorTip]="'请输入联系人信息'"> <!-- <nz-form-control [nzErrorTip]="'请输入联系人信息'">
<div class="align-center"> <div class="align-center">
<input nz-input [(ngModel)]="data.appUserName" formControlName="loadName{{ idx }}" maxlength="30" /> <input nz-input [(ngModel)]="data.appUserName" formControlName="loadName{{ idx }}" maxlength="30" />
<input <input
@ -53,7 +53,30 @@
maxlength="11" maxlength="11"
/> />
</div> </div>
</nz-form-control> </nz-form-control> -->
<div style="display: flex">
<nz-form-control [nzErrorTip]="'请输入联系人姓名'">
<input
nz-input
[(ngModel)]="data.appUserName"
formControlName="loadName{{ idx }}"
name="loadName{{ idx }}"
maxlength="30"
placeholder="请输入联系人姓名"
/>
</nz-form-control>
<nz-form-control [nzErrorTip]="'请输入联系人电话'">
<input
style="margin-left: 12px"
nz-input
[(ngModel)]="data.contractTelephone"
maxlength="11"
formControlName="loadPhone{{ idx }}"
name="loadPhone{{ idx }}"
placeholder="请输入联系人电话"
/>
</nz-form-control>
</div>
</nz-form-item> </nz-form-item>
</div> </div>
<button nz-button nzType="primary" (click)="addStartInfo($event)"> <button nz-button nzType="primary" (click)="addStartInfo($event)">
@ -90,7 +113,7 @@
</nz-form-item> </nz-form-item>
<nz-form-item> <nz-form-item>
<nz-form-label [nzSpan]="4" nzRequired>联系人</nz-form-label> <nz-form-label [nzSpan]="4" nzRequired>联系人</nz-form-label>
<nz-form-control [nzErrorTip]="'请输入联系人信息'"> <!-- <nz-form-control [nzErrorTip]="'请输入联系人信息'">
<div class="align-center"> <div class="align-center">
<input nz-input [(ngModel)]="data.appUserName" formControlName="unloadName{{ idx }}" maxlength="30" /> <input nz-input [(ngModel)]="data.appUserName" formControlName="unloadName{{ idx }}" maxlength="30" />
<input <input
@ -101,7 +124,30 @@
maxlength="11" maxlength="11"
/> />
</div> </div>
</nz-form-control> </nz-form-control> -->
<div style="display: flex">
<nz-form-control [nzErrorTip]="'请输入联系人姓名'">
<input
nz-input
[(ngModel)]="data.appUserName"
maxlength="30"
formControlName="unloadName{{ idx }}"
name="unloadAddress{{ idx }}"
placeholder="请输入联系人姓名"
/>
</nz-form-control>
<nz-form-control [nzErrorTip]="'请输入联系人电话'">
<input
style="margin-left: 12px"
nz-input
[(ngModel)]="data.contractTelephone"
formControlName="unloadPhone{{ idx }}"
name="unloadAddress{{ idx }}"
maxlength="11"
placeholder="请输入联系人电话"
/>
</nz-form-control>
</div>
</nz-form-item> </nz-form-item>
</div> </div>
<button nz-button nzType="primary" (click)="addEndInfo($event)"> <button nz-button nzType="primary" (click)="addEndInfo($event)">
@ -283,9 +329,9 @@
<nz-card> <nz-card>
<div class="align-center"> <div class="align-center">
<button nz-button nzType="primary" *ngIf="this.PageStatus == '整车修改'" (click)="goBack()">取消</button> <button nz-button nzType="primary" *ngIf="this.PageStatus == '整车修改'" (click)="goBack()">取消</button>
<button *ngIf="this.PageStatus == '整车修改'" nz-button nzType="primary" style="margin-left: 48px" (click)="submit()">提交修改</button> <button *ngIf="this.PageStatus == '整车修改'" nz-button nzType="primary" style="margin-left: 48px" (click)="submitConfirm()">提交修改</button>
<button nz-button nzType="primary" *ngIf="this.PageStatus == '整车下一单'" (click)="submitConfirm('assign')">指派熟车</button> <button nz-button nzType="primary" *ngIf="this.PageStatus == '整车下一单'" (click)="submitConfirm('assign')">指派熟车</button>
<button *ngIf="this.PageStatus == '整车下一单'" nz-button nzType="primary" style="margin-left: 48px" (click)="submit()" <button *ngIf="this.PageStatus == '整车下一单'" nz-button nzType="primary" style="margin-left: 48px" (click)="submitConfirm()"
>司机抢单</button >司机抢单</button
> >
</div> </div>

View File

@ -57,6 +57,12 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
public shipperSrv: ShipperBaseService public shipperSrv: ShipperBaseService
) { ) {
this.validateForm1 = fb.group({ this.validateForm1 = fb.group({
loadAddress0: [null, [Validators.required]],
loadName0: [null, [Validators.required]],
loadPhone0: [null, [Validators.required,Validators.pattern('^[0-9]*$')]],
unloadAddress0: [null, [Validators.required]],
unloadName0: [null, [Validators.required]],
unloadPhone0: [null, [Validators.required,Validators.pattern('^[0-9]*$')]],
loadingTime: [null, []], loadingTime: [null, []],
unloadingTime: [null, []] unloadingTime: [null, []]
}); });
@ -738,6 +744,20 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
} }
// 提交前确认,委托运输协议弹窗 // 提交前确认,委托运输协议弹窗
submitConfirm(submitType?: any) { submitConfirm(submitType?: any) {
Object.keys(this.validateForm1.controls).forEach(key => {
this.validateForm1.controls[key].markAsDirty();
this.validateForm1.controls[key].updateValueAndValidity();
});
this.sf1.validator({ emitError: true });
this.sf3.validator({ emitError: true });
this.sf4.validator({ emitError: true });
this.sf6.validator({ emitError: true });
this.sf7.validator({ emitError: true });
console.log(this.sf1.valid);
if (this.validateForm1.invalid || !this.sf3.valid || !this.sf1.valid || !this.sf4.valid || !this.sf6.valid || !this.sf7.valid) {
return;
}
const modalRef = this.modalService.create({ const modalRef = this.modalService.create({
nzTitle: '运输协议', nzTitle: '运输协议',
nzContent: TranAgreementComponent, nzContent: TranAgreementComponent,
@ -766,6 +786,7 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
if (this.validateForm1.invalid || !this.sf3.valid || !this.sf1.valid || !this.sf4.valid || !this.sf6.valid || !this.sf7.valid) { if (this.validateForm1.invalid || !this.sf3.valid || !this.sf1.valid || !this.sf4.valid || !this.sf6.valid || !this.sf7.valid) {
return; return;
} }
console.log(this.validateForm1.value?.unloadingTime)
if (typeof this.validateForm1.value.unloadingTime !== 'string') { if (typeof this.validateForm1.value.unloadingTime !== 'string') {
var c = new Date(this.validateForm1.value.unloadingTime); var c = new Date(this.validateForm1.value.unloadingTime);
this.validateForm1.value.unloadingTime = this.validateForm1.value.unloadingTime =

View File

@ -49,7 +49,7 @@
</nz-form-item> </nz-form-item>
<nz-form-item> <nz-form-item>
<nz-form-label [nzSpan]="4" nzRequired>联系人</nz-form-label> <nz-form-label [nzSpan]="4" nzRequired>联系人</nz-form-label>
<div class="align-center"> <div style="display: flex;">
<nz-form-control [nzErrorTip]="'请输入联系人姓名'"> <nz-form-control [nzErrorTip]="'请输入联系人姓名'">
<input <input
nz-input nz-input
@ -114,7 +114,7 @@
</nz-form-item> </nz-form-item>
<nz-form-item> <nz-form-item>
<nz-form-label [nzSpan]="4" nzRequired>联系人</nz-form-label> <nz-form-label [nzSpan]="4" nzRequired>联系人</nz-form-label>
<div class="align-center"> <div style="display: flex;">
<nz-form-control [nzErrorTip]="'请输入联系人姓名'"> <nz-form-control [nzErrorTip]="'请输入联系人姓名'">
<input <input
nz-input nz-input
@ -310,17 +310,7 @@
</nz-card> </nz-card>
<nz-card> <nz-card>
<div class="align-center"> <div class="align-center">
<button nz-button nzType="primary" (click)="submitConfirm('assign')" *ngIf="type === 'add'">指派熟车</button> <button nz-button nzType="primary" (click)="submitConfirm('assign')" >指派熟车</button>
<button nz-button nzType="primary" style="margin-left: 48px" (click)="submit('publish')" *ngIf="type === 'add'">司机抢单</button> <button nz-button nzType="primary" style="margin-left: 48px" (click)="submitConfirm('publish')" *ngIf="type === 'add'">司机抢单</button>
<button
nz-button
nzType="primary"
style="margin-left: 48px"
(click)="submit('publish')"
*ngIf="type === 'edit'"
[nzLoading]="service.http.loading"
>保存</button
>
<button nz-button nzType="primary" style="margin-left: 48px" (click)="goBack()" *ngIf="type === 'edit'">取消</button>
</div> </div>
</nz-card> </nz-card>

View File

@ -60,8 +60,14 @@ export class SupplyManagementReleasePublishComponent implements OnInit {
public shipperSrv: ShipperBaseService public shipperSrv: ShipperBaseService
) { ) {
this.validateForm1 = fb.group({ this.validateForm1 = fb.group({
loadingTime: [null, [Validators.required]], loadAddress0: [null, [Validators.required]],
unloadingTime: [null, [Validators.required]] loadName0: [null, [Validators.required]],
loadPhone0: [null, [Validators.required,Validators.pattern('^[0-9]*$')]],
unloadAddress0: [null, [Validators.required]],
unloadName0: [null, [Validators.required]],
unloadPhone0: [null, [Validators.required,Validators.pattern('^[0-9]*$')]],
loadingTime: [null, []],
unloadingTime: [null, []]
}); });
} }
@ -684,6 +690,19 @@ export class SupplyManagementReleasePublishComponent implements OnInit {
} }
// 提交前确认,委托运输协议弹窗 // 提交前确认,委托运输协议弹窗
submitConfirm(submitType?: any) { submitConfirm(submitType?: any) {
Object.keys(this.validateForm1.controls).forEach(key => {
this.validateForm1.controls[key].markAsDirty();
this.validateForm1.controls[key].updateValueAndValidity();
});
this.sf1.validator({ emitError: true });
this.sf3.validator({ emitError: true });
this.sf4.validator({ emitError: true });
this.sf6.validator({ emitError: true });
this.sf7.validator({ emitError: true });
if (this.validateForm1.invalid || !this.sf1.valid || !this.sf3.valid || !this.sf4.valid || !this.sf6.valid || !this.sf7.valid) {
return;
}
const modalRef = this.modalService.create({ const modalRef = this.modalService.create({
nzTitle: '运输协议', nzTitle: '运输协议',
nzContent: TranAgreementComponent, nzContent: TranAgreementComponent,
@ -698,19 +717,6 @@ export class SupplyManagementReleasePublishComponent implements OnInit {
} }
// 提交 // 提交
submit(submitType: string): void { submit(submitType: string): void {
Object.keys(this.validateForm1.controls).forEach(key => {
this.validateForm1.controls[key].markAsDirty();
this.validateForm1.controls[key].updateValueAndValidity();
});
this.sf1.validator({ emitError: true });
this.sf3.validator({ emitError: true });
this.sf4.validator({ emitError: true });
this.sf6.validator({ emitError: true });
this.sf7.validator({ emitError: true });
if (this.validateForm1.invalid || !this.sf1.valid || !this.sf3.valid || !this.sf4.valid || !this.sf6.valid || !this.sf7.valid) {
return;
}
//装卸货信息 //装卸货信息
const LoadingList = this.startInfo.concat(this.endInfo); const LoadingList = this.startInfo.concat(this.endInfo);
// 货物信息 // 货物信息

View File

@ -1,10 +1,10 @@
<!-- <!--
* @Author: your name * @Author: your name
* @Date: 2021-12-03 11:10:14 * @Date: 2021-12-03 11:10:14
* @LastEditTime: 2022-01-18 16:50:23 * @LastEditTime : 2022-01-19 14:36:08
* @LastEditors: Please set LastEditors * @LastEditors : Shiming
* @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\\waybill-management\\components\\bulk\\bulk.component.html
--> -->
<!-- 搜索表单 --> <!-- 搜索表单 -->
<page-header-wrapper [title]="''"> <page-header-wrapper [title]="''">
@ -43,7 +43,7 @@
<nz-tab [nzTitle]="'运输中('+tabs?.cancelQuantity+')'"></nz-tab> <nz-tab [nzTitle]="'运输中('+tabs?.cancelQuantity+')'"></nz-tab>
<nz-tab [nzTitle]="'待签收('+tabs?.signQuantity+')'"></nz-tab> <nz-tab [nzTitle]="'待签收('+tabs?.signQuantity+')'"></nz-tab>
<nz-tab [nzTitle]="'已完成('+tabs?.compolatelQuantity+')'"></nz-tab> <nz-tab [nzTitle]="'已完成('+tabs?.compolatelQuantity+')'"></nz-tab>
<nz-tab [nzTitle]="'已取消'"></nz-tab> <nz-tab [nzTitle]="'已取消('+tabs?.deltQuantity+')'"></nz-tab>
</nz-tabset> </nz-tabset>
<div style="margin-top: 15px;"> <div style="margin-top: 15px;">
<st <st

View File

@ -32,7 +32,8 @@ tabs = {
cancelQuantity: 0, cancelQuantity: 0,
receivedQuantity: 0, receivedQuantity: 0,
totalQuantity: 0, totalQuantity: 0,
compolatelQuantity: 0 compolatelQuantity: 0,
deltQuantity: 0
}; };
constructor( constructor(
public service: WaybillManagementServe, public service: WaybillManagementServe,
@ -390,6 +391,14 @@ tabs = {
this.isVisibleEvaluate = true this.isVisibleEvaluate = true
} }
getGoodsSourceStatistical() { getGoodsSourceStatistical() {
this.tabs = {
signQuantity: 0,
cancelQuantity: 0,
receivedQuantity: 0,
totalQuantity: 0,
compolatelQuantity: 0,
deltQuantity: 0
};
this.service.request(this.service.$api_get_getBulkStatistics, this.reqParams).subscribe(res => { this.service.request(this.service.$api_get_getBulkStatistics, this.reqParams).subscribe(res => {
if (res) { if (res) {
let totalCount = 0; let totalCount = 0;
@ -407,6 +416,9 @@ tabs = {
case '5': case '5':
this.tabs.compolatelQuantity = ele?.count; this.tabs.compolatelQuantity = ele?.count;
break; break;
case '6':
this.tabs.deltQuantity = ele?.count;
break;
} }
totalCount += ele.count totalCount += ele.count
}); });

View File

@ -44,7 +44,7 @@
<nz-tab [nzTitle]="'运输中('+tabs?.cancelQuantity+')'"></nz-tab> <nz-tab [nzTitle]="'运输中('+tabs?.cancelQuantity+')'"></nz-tab>
<nz-tab [nzTitle]="'待签收('+tabs?.signQuantity+')'"></nz-tab> <nz-tab [nzTitle]="'待签收('+tabs?.signQuantity+')'"></nz-tab>
<nz-tab [nzTitle]="'已完成('+tabs?.compolatelQuantity+')'"></nz-tab> <nz-tab [nzTitle]="'已完成('+tabs?.compolatelQuantity+')'"></nz-tab>
<nz-tab [nzTitle]="'已取消'"></nz-tab> <nz-tab [nzTitle]="'已取消('+tabs?.deltQuantity+')'"></nz-tab>
</nz-tabset> </nz-tabset>
<div style="margin-top: 15px;"> <div style="margin-top: 15px;">
<st #st [bordered]="true" [scroll]="{ x: '2000px' }" [data]="service.$api_get_wholePage" [columns]="columns" <st #st [bordered]="true" [scroll]="{ x: '2000px' }" [data]="service.$api_get_wholePage" [columns]="columns"

View File

@ -32,7 +32,8 @@ export class WaybillManagementVehicleComponent implements OnInit {
receivedQuantity: 0, receivedQuantity: 0,
stayQuantity: 0, stayQuantity: 0,
totalQuantity: 0, totalQuantity: 0,
compolatelQuantity: 0 compolatelQuantity: 0,
deltQuantity: 0
}; };
constructor( constructor(
public service: WaybillManagementServe, public service: WaybillManagementServe,
@ -378,6 +379,15 @@ export class WaybillManagementVehicleComponent implements OnInit {
this.isVisibleEvaluate = true; this.isVisibleEvaluate = true;
} }
getGoodsSourceStatistical() { getGoodsSourceStatistical() {
this.tabs = {
signQuantity: 0,
cancelQuantity: 0,
receivedQuantity: 0,
stayQuantity: 0,
totalQuantity: 0,
compolatelQuantity: 0,
deltQuantity: 0
};
this.service.request(this.service.$api_get_getWholeStatistics, this.reqParams).subscribe(res => { this.service.request(this.service.$api_get_getWholeStatistics, this.reqParams).subscribe(res => {
if (res) { if (res) {
let totalCount = 0; let totalCount = 0;
@ -398,6 +408,9 @@ export class WaybillManagementVehicleComponent implements OnInit {
case '5': case '5':
this.tabs.compolatelQuantity = ele?.count; this.tabs.compolatelQuantity = ele?.count;
break; break;
case '6':
this.tabs.deltQuantity = ele?.count;
break;
} }
totalCount += ele.count totalCount += ele.count
}); });