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
* @Date : 2022-01-12 10:52:50
* @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
* Copyright (C) 2022 huzhenhong. All rights reserved.
-->
@ -71,7 +71,7 @@
</ng-template>
<ng-template st-row="driverName" let-item let-index="index">
<div>
{{item?.driverName}}/{{item?.driverPhone}}
{{item?.driverName}}/{{item?.driverPhone}}/{{item?.carNo}}
</div>
</ng-template>
<ng-template st-row="payeeName" let-item let-index="index">

View File

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

View File

@ -126,6 +126,7 @@ export class OrderManagementComplaintComponent implements OnInit {
{
title: '投诉单号',
width: '170px',
fixed: 'left',
className: 'text-center',
render: 'complaintCode'
},
@ -141,7 +142,7 @@ export class OrderManagementComplaintComponent implements OnInit {
index: 'complainantTime',
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: '投诉原因',

View File

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

View File

@ -4,7 +4,7 @@
* @Author : Shiming
* @Date : 2022-01-12 10:52:50
* @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
* Copyright (C) 2022 huzhenhong. All rights reserved.
-->
@ -101,7 +101,7 @@
</ng-template>
<ng-template st-row="driverName" let-item let-index="index">
<div>
{{item?.driverName}}/{{item?.driverPhone}}
{{item?.driverName}}/{{item?.driverPhone}}/{{item?.carNo}}
</div>
</ng-template>
<ng-template st-row="payeeName" let-item let-index="index">

View File

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

View File

@ -40,7 +40,7 @@
</nz-form-item>
<nz-form-item>
<nz-form-label [nzSpan]="4" nzRequired>联系人</nz-form-label>
<div class="align-center">
<div style="display: flex;">
<nz-form-control [nzErrorTip]="'请输入联系人姓名'">
<input
nz-input
@ -92,7 +92,7 @@
</nz-form-item>
<nz-form-item>
<nz-form-label [nzSpan]="4" nzRequired>联系人</nz-form-label>
<div class="align-center">
<div style="display: flex;">
<nz-form-control [nzErrorTip]="'请输入联系人姓名'">
<input
nz-input
@ -240,8 +240,8 @@
<nz-card>
<div class="align-center">
<!-- <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" style="margin-left: 48px" (click)="submit('publish')">司机抢单</button>
<button nz-button nzType="primary" style="margin-left: 48px" (click)="submitConfirm('publish')">司机抢单</button>
</div>
</nz-card>

View File

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

View File

@ -17,7 +17,9 @@
</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">
<div nz-row [nzGutter]="24">
@ -28,24 +30,44 @@
<nz-form-control [nzErrorTip]="'请输入装货地'">
<div class="align-center">
<nz-input-group [nzSuffix]="endInconTemp1">
<input nz-input [(ngModel)]="data1.detailedAddress" (click)="openMap('start', idx)"
name="startDetailedAddress{{ idx }}" placeholder="请输入装货地" required />
<input
nz-input
[(ngModel)]="data1.detailedAddress"
(click)="openMap('start', idx)"
name="startDetailedAddress{{ idx }}"
placeholder="请输入装货地"
required
/>
</nz-input-group>
<span style="padding: 0 10px"><i nz-icon nzType="menu" nzTheme="outline" style="color: #1890ff"
(click)="chooseAddress(idx, 'start')"></i></span>
<span style="padding: 0 10px"
><i nz-icon nzType="menu" nzTheme="outline" style="color: #1890ff" (click)="chooseAddress(idx, 'start')"></i
></span>
</div>
</nz-form-control>
</nz-form-item>
<nz-form-item>
<nz-form-label [nzSpan]="4" nzRequired>联系人</nz-form-label>
<div class="align-center">
<div style="display: flex">
<nz-form-control [nzErrorTip]="'请输入联系人姓名'">
<input nz-input [(ngModel)]="data1.appUserName" name="startAppUserName{{ idx }}" maxlength="30"
placeholder="请输入联系人姓名" required />
<input
nz-input
[(ngModel)]="data1.appUserName"
name="startAppUserName{{ idx }}"
maxlength="30"
placeholder="请输入联系人姓名"
required
/>
</nz-form-control>
<nz-form-control [nzErrorTip]="'请输入联系人电话'">
<input style="margin-left: 12px" nz-input [(ngModel)]="data1.contractTelephone" maxlength="11"
name="startContractTelephone{{ idx }}" placeholder="请输入联系人电话" required/>
<input
style="margin-left: 12px"
nz-input
[(ngModel)]="data1.contractTelephone"
maxlength="11"
name="startContractTelephone{{ idx }}"
placeholder="请输入联系人电话"
required
/>
</nz-form-control>
</div>
</nz-form-item>
@ -53,8 +75,7 @@
</div>
<div nz-col [nzSpan]="4">
<div style="display: flex; justify-content: center">
<span style="padding: 24 px; font-size: 30px; color: #7d7d7d"><i nz-icon nzType="swap"
nzTheme="outline"></i></span>
<span style="padding: 24 px; font-size: 30px; color: #7d7d7d"><i nz-icon nzType="swap" nzTheme="outline"></i></span>
</div>
</div>
<div nz-col [nzSpan]="10">
@ -64,24 +85,44 @@
<nz-form-control [nzErrorTip]="'请输入卸货地'">
<div class="align-center">
<nz-input-group [nzSuffix]="endInconTemp1">
<input nz-input [(ngModel)]="data2.detailedAddress" (click)="openMap('end', idx)"
name="endDetailedAddress{{ idx }}" placeholder="请输入卸货地" required/>
<input
nz-input
[(ngModel)]="data2.detailedAddress"
(click)="openMap('end', idx)"
name="endDetailedAddress{{ idx }}"
placeholder="请输入卸货地"
required
/>
</nz-input-group>
<span style="padding: 0 10px"><i nz-icon nzType="menu" nzTheme="outline" style="color: #1890ff"
(click)="chooseAddress(idx, 'end')"></i></span>
<span style="padding: 0 10px"
><i nz-icon nzType="menu" nzTheme="outline" style="color: #1890ff" (click)="chooseAddress(idx, 'end')"></i
></span>
</div>
</nz-form-control>
</nz-form-item>
<nz-form-item>
<nz-form-label [nzSpan]="4" nzRequired>联系人</nz-form-label>
<div class="align-center">
<div style="display: flex">
<nz-form-control [nzErrorTip]="'请输入联系人姓名'">
<input nz-input [(ngModel)]="data2.appUserName" maxlength="30" name="endAppUserName{{ idx }}"
placeholder="请输入联系人姓名" required/>
<input
nz-input
[(ngModel)]="data2.appUserName"
maxlength="30"
name="endAppUserName{{ idx }}"
placeholder="请输入联系人姓名"
required
/>
</nz-form-control>
<nz-form-control [nzErrorTip]="'请输入联系人电话'">
<input style="margin-left: 12px" nz-input [(ngModel)]="data2.contractTelephone"
name="endUnloadPhone{{ idx }}" maxlength="11" placeholder="请输入联系人电话" required/>
<input
style="margin-left: 12px"
nz-input
[(ngModel)]="data2.contractTelephone"
name="endUnloadPhone{{ idx }}"
maxlength="11"
placeholder="请输入联系人电话"
required
/>
</nz-form-control>
</div>
</nz-form-item>
@ -100,12 +141,20 @@
<sf #sf4 [schema]="schema4" [button]="'none'" [ui]="ui4" [formData]="sf4data">
<ng-template sf-template="freightPrice" let-i let-ui="ui">
<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>
<ng-template #addOnAfterTemplate>
<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>
<nz-option [nzValue]="item.value" [nzLabel]="item.label" *ngFor="let item of freightTypeOptions"></nz-option>
</nz-select>
</ng-template>
</ng-template>
@ -116,8 +165,9 @@
<nz-option nzLabel="抹除小数" nzValue="2"></nz-option>
<nz-option nzLabel="抹除个数" nzValue="3"></nz-option>
</nz-select>
<span style="padding: 0 12px" nz-tooltip [nzTooltipTitle]="template2" nzTooltipPlacement="bottom"><i nz-icon
nzType="exclamation-circle" nzTheme="outline" style="color: #1890ff"></i></span>
<span style="padding: 0 12px" nz-tooltip [nzTooltipTitle]="template2" nzTooltipPlacement="bottom"
><i nz-icon nzType="exclamation-circle" nzTheme="outline" style="color: #1890ff"></i
></span>
<ng-template #template2>
<p>例如 付司机运费 = 重量*单价 = 999.99</p>
<p>保留小数,即 999.99</p>
@ -128,20 +178,41 @@
</ng-template>
<ng-template sf-template="weight" let-i let-ui="ui">
<nz-input-group [nzAddOnAfter]="''">
<input nz-input type="number" [ngModel]="i.value" min="0" step="0.01" (ngModelChange)="i.setValue($event)"
placeholder="总重量,必填" />
<input
nz-input
type="number"
[ngModel]="i.value"
min="0"
step="0.01"
(ngModelChange)="i.setValue($event)"
placeholder="总重量,必填"
/>
</nz-input-group>
</ng-template>
<ng-template sf-template="volume" let-i let-ui="ui">
<nz-input-group [nzAddOnAfter]="''">
<input nz-input type="number" [ngModel]="i.value" min="0" step="0.01" (ngModelChange)="i.setValue($event)"
placeholder="总体积" />
<input
nz-input
type="number"
[ngModel]="i.value"
min="0"
step="0.01"
(ngModelChange)="i.setValue($event)"
placeholder="总体积"
/>
</nz-input-group>
</ng-template>
<ng-template sf-template="number" let-i let-ui="ui">
<nz-input-group [nzAddOnAfter]="''">
<input nz-input type="number" [ngModel]="i.value" min="0" step="0.01" (ngModelChange)="i.setValue($event)"
placeholder="总车次" />
<input
nz-input
type="number"
[ngModel]="i.value"
min="0"
step="0.01"
(ngModelChange)="i.setValue($event)"
placeholder="总车次"
/>
</nz-input-group>
</ng-template>
</sf>
@ -165,12 +236,18 @@
</ng-template>
<ng-template sf-template="paymentDays" let-i let-ui="ui">
<div nz-row>
<div class="align-center2" style="width: 350px;">
<div class="align-center2" style="width: 350px">
<div nz-col nzSpan="12">
<nz-input-number [ngModel]="i.value" [nzMin]="1" [nzMax]="30" [nzStep]="1"
(ngModelChange)="i.setValue($event)" nzPlaceHolder="请输入1-30"></nz-input-number>
<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>
<span>&nbsp;&nbsp; 天内支付运费</span>
</div>
</div>
@ -185,7 +262,7 @@
<div class="align-center">
<!-- <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" style="margin-left: 48px" (click)="submit('publish')">司机抢单</button>
<button nz-button nzType="primary" (click)="submitConfirm('assign')">指派熟车</button>
<button nz-button nzType="primary" style="margin-left: 48px" (click)="submitConfirm('publish')">司机抢单</button>
</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 { PublishAddressListComponent } from '../onecar-publish/address-list/address-list.component';
import { PublishSuccessComponent } from '../onecar-publish/publish-success/publish-success.component';
import { TranAgreementComponent } from '../tran-agreement/tran-agreement.component';
@Component({
selector: 'app-publish-goods-bulk-publish',
templateUrl: './bulk-release-publish.component.html',
@ -53,7 +54,9 @@ export class SupplyManagementBulkReleasePublishComponent implements OnInit {
private route: ActivatedRoute,
private amapService: AmapService,
public shipperSrv: ShipperBaseService
) {}
) {
}
@ViewChild('sf1', { static: false }) sf1!: SFComponent;
schema1: SFSchema = {};
ui1!: SFUISchema;
@ -114,6 +117,7 @@ export class SupplyManagementBulkReleasePublishComponent implements OnInit {
serverSearch: true,
searchDebounceTime: 300,
searchLoadingText: '搜索中...',
allowClear: true,
onSearch: (q: any) => {
if (!!q) {
return this.service
@ -135,7 +139,7 @@ export class SupplyManagementBulkReleasePublishComponent implements OnInit {
ui: {
widget: 'select',
placeholder: '请选择',
allowClear: true
allowClear: true,
} as SFSelectWidgetSchema
},
// enterpriseInfoName: {
@ -161,6 +165,7 @@ export class SupplyManagementBulkReleasePublishComponent implements OnInit {
type: 'string',
format: 'date-time',
ui: {
placeholder: '请输入',
format: 'yyyy-MM-dd HH:mm:ss'
}
@ -569,19 +574,35 @@ export class SupplyManagementBulkReleasePublishComponent implements OnInit {
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 {
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);
// 货物信息

View File

@ -42,7 +42,7 @@
</nz-form-item>
<nz-form-item>
<nz-form-label [nzSpan]="4" nzRequired>联系人</nz-form-label>
<nz-form-control [nzErrorTip]="'请输入联系人信息'">
<!-- <nz-form-control [nzErrorTip]="'请输入联系人信息'">
<div class="align-center">
<input nz-input [(ngModel)]="data.appUserName" formControlName="loadName{{ idx }}" maxlength="30" />
<input
@ -53,7 +53,30 @@
maxlength="11"
/>
</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>
</div>
<button nz-button nzType="primary" (click)="addStartInfo($event)">
@ -90,7 +113,7 @@
</nz-form-item>
<nz-form-item>
<nz-form-label [nzSpan]="4" nzRequired>联系人</nz-form-label>
<nz-form-control [nzErrorTip]="'请输入联系人信息'">
<!-- <nz-form-control [nzErrorTip]="'请输入联系人信息'">
<div class="align-center">
<input nz-input [(ngModel)]="data.appUserName" formControlName="unloadName{{ idx }}" maxlength="30" />
<input
@ -101,7 +124,30 @@
maxlength="11"
/>
</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>
</div>
<button nz-button nzType="primary" (click)="addEndInfo($event)">
@ -283,9 +329,9 @@
<nz-card>
<div class="align-center">
<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 *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
>
</div>

View File

@ -57,6 +57,12 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
public shipperSrv: ShipperBaseService
) {
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, []],
unloadingTime: [null, []]
});
@ -738,6 +744,20 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
}
// 提交前确认,委托运输协议弹窗
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({
nzTitle: '运输协议',
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) {
return;
}
console.log(this.validateForm1.value?.unloadingTime)
if (typeof this.validateForm1.value.unloadingTime !== 'string') {
var c = new Date(this.validateForm1.value.unloadingTime);
this.validateForm1.value.unloadingTime =

View File

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

View File

@ -60,8 +60,14 @@ export class SupplyManagementReleasePublishComponent implements OnInit {
public shipperSrv: ShipperBaseService
) {
this.validateForm1 = fb.group({
loadingTime: [null, [Validators.required]],
unloadingTime: [null, [Validators.required]]
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, []],
unloadingTime: [null, []]
});
}
@ -684,6 +690,19 @@ export class SupplyManagementReleasePublishComponent implements OnInit {
}
// 提交前确认,委托运输协议弹窗
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({
nzTitle: '运输协议',
nzContent: TranAgreementComponent,
@ -698,19 +717,6 @@ export class SupplyManagementReleasePublishComponent implements OnInit {
}
// 提交
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);
// 货物信息

View File

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

View File

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

View File

@ -44,7 +44,7 @@
<nz-tab [nzTitle]="'运输中('+tabs?.cancelQuantity+')'"></nz-tab>
<nz-tab [nzTitle]="'待签收('+tabs?.signQuantity+')'"></nz-tab>
<nz-tab [nzTitle]="'已完成('+tabs?.compolatelQuantity+')'"></nz-tab>
<nz-tab [nzTitle]="'已取消'"></nz-tab>
<nz-tab [nzTitle]="'已取消('+tabs?.deltQuantity+')'"></nz-tab>
</nz-tabset>
<div style="margin-top: 15px;">
<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,
stayQuantity: 0,
totalQuantity: 0,
compolatelQuantity: 0
compolatelQuantity: 0,
deltQuantity: 0
};
constructor(
public service: WaybillManagementServe,
@ -378,6 +379,15 @@ export class WaybillManagementVehicleComponent implements OnInit {
this.isVisibleEvaluate = true;
}
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 => {
if (res) {
let totalCount = 0;
@ -398,6 +408,9 @@ export class WaybillManagementVehicleComponent implements OnInit {
case '5':
this.tabs.compolatelQuantity = ele?.count;
break;
case '6':
this.tabs.deltQuantity = ele?.count;
break;
}
totalCount += ele.count
});