fix bug
This commit is contained in:
@ -24,7 +24,7 @@
|
||||
<input nz-input [(ngModel)]="data.detailedAddress" [ngModelOptions]="{ standalone: true }" />
|
||||
</nz-input-group>
|
||||
<span style="padding: 0 10px"
|
||||
><i nz-icon nzType="menu" nzTheme="outline" style="color: #1890ff" (click)="openMap()"></i
|
||||
><i nz-icon nzType="menu" nzTheme="outline" style="color: #1890ff" (click)="openMap('start', idx)"></i
|
||||
></span>
|
||||
<span *ngIf="idx !== 0"
|
||||
><i nz-icon nzType="minus-circle-o" nzTheme="fill" style="color: #d9001b" (click)="subStartInfo($event, idx)">X</i
|
||||
@ -178,6 +178,7 @@
|
||||
<ng-template sf-template="name5" let-i let-ui="ui">¥0.00</ng-template>
|
||||
<ng-template sf-template="name6" let-i let-ui="ui">¥0.00</ng-template>
|
||||
<ng-template sf-template="name7" let-i let-ui="ui">¥0.00</ng-template>
|
||||
<ng-template sf-template="totalFee" let-i let-ui="ui" >{{totalFees | currency: '¥'}}</ng-template>
|
||||
<ng-template sf-template="name8" let-i let-ui="ui">
|
||||
<div nz-row>
|
||||
<div class="align-center">
|
||||
|
||||
@ -30,6 +30,7 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
|
||||
sf7data: any; // 货源单设置回显
|
||||
creatTime: any; // 货源单设置回显
|
||||
modifyTime: any; // 货源单设置回显
|
||||
totalFees: any; // 总数信息
|
||||
id = this.route.snapshot.params.id;
|
||||
// // 单位
|
||||
unit1 = '吨';
|
||||
@ -44,7 +45,6 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
|
||||
modifyTime: [null, []],
|
||||
});
|
||||
}
|
||||
|
||||
@ViewChild('sf1', { static: false }) sf1!: SFComponent;
|
||||
schema1: SFSchema = {};
|
||||
ui1!: SFUISchema;
|
||||
@ -81,25 +81,26 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
|
||||
this.initSF6();
|
||||
this.initSF7();
|
||||
this.initdata();
|
||||
console.log( this.route.snapshot?.queryParams)
|
||||
}
|
||||
|
||||
initSF1() {
|
||||
this.schema1 = {
|
||||
properties: {
|
||||
shipperAppUserNmae: {
|
||||
type: 'string',
|
||||
title: '货主',
|
||||
maxLength: 30,
|
||||
ui: {
|
||||
placeholder: '请输入'
|
||||
}
|
||||
},
|
||||
// shipperAppUserName: {
|
||||
// type: 'string',
|
||||
// title: '货主',
|
||||
// maxLength: 30,
|
||||
// ui: {
|
||||
// placeholder: '请输入'
|
||||
// }
|
||||
// },
|
||||
enterpriseProjectName: {
|
||||
type: 'string',
|
||||
title: '项目',
|
||||
enum: [
|
||||
{ label: '1', value: '1' },
|
||||
{ label: '2', value: '2' }
|
||||
{ label: '项目1', value: '1' },
|
||||
{ label: '项目2', value: '2' }
|
||||
],
|
||||
ui: {
|
||||
widget: 'select',
|
||||
@ -131,12 +132,12 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
|
||||
placeholder: '请输入'
|
||||
}
|
||||
},
|
||||
dispatchName2: {
|
||||
dispatchId: {
|
||||
type: 'string',
|
||||
title: '调度员',
|
||||
enum: [
|
||||
{ label: '1', value: '1' },
|
||||
{ label: '2', value: '2' }
|
||||
{ label: '调度员1', value: '1' },
|
||||
{ label: '调度员2', value: '2' }
|
||||
],
|
||||
ui: {
|
||||
widget: 'select',
|
||||
@ -190,8 +191,9 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
|
||||
type: 'string',
|
||||
title: '货物名称',
|
||||
enum: [
|
||||
{ label: '1', value: '1' },
|
||||
{ label: '2', value: '2' }
|
||||
{ label: '真实货物', value: '1' },
|
||||
{ label: '远程货物', value: '2' },
|
||||
{ label: '其他', value: '3' }
|
||||
],
|
||||
ui: {
|
||||
widget: 'select',
|
||||
@ -207,12 +209,12 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
|
||||
// change: (i) => this.updateCategory(i, '/categoryId2'),
|
||||
} as SFSelectWidgetSchema
|
||||
},
|
||||
name2: {
|
||||
qita: {
|
||||
type: 'string',
|
||||
title: '',
|
||||
ui: {
|
||||
visibleIf: {
|
||||
name1: value => value === '1'
|
||||
goodsNameId: value => value === '3'
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -223,10 +225,10 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
|
||||
spanLabelFixed: 90,
|
||||
grid: { span: 12 }
|
||||
},
|
||||
$name1: {
|
||||
$goodsNameId: {
|
||||
grid: { span: 12 }
|
||||
},
|
||||
$name2: {
|
||||
$qita: {
|
||||
grid: { span: 12 }
|
||||
}
|
||||
};
|
||||
@ -377,14 +379,24 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
changeValue() {
|
||||
this.totalFees = this.sf7?.value?.appendFee + this.sf7?.value?.oilCardPay + this.sf7?.value?.prePay +this.sf7?.value?.receiptPay + this.sf7?.value?.toPay
|
||||
}
|
||||
initSF7() {
|
||||
this.schema7 = {
|
||||
properties: {
|
||||
prePay: { type: 'number', title: '预付', default: 0, ui: { prefix: '¥' } as SFNumberWidgetSchema },
|
||||
toPay: { type: 'number', title: '到付', default: 0, ui: { prefix: '¥' } as SFNumberWidgetSchema },
|
||||
oilCardPay: { type: 'number', title: '油卡', default: 0, ui: { prefix: '¥' } as SFNumberWidgetSchema },
|
||||
receiptPay: { type: 'number', title: '回单付', default: 0, ui: { prefix: '¥' } as SFNumberWidgetSchema },
|
||||
prePay: { type: 'number', title: '预付', default: 0, ui: { prefix: '¥', change: ()=> {
|
||||
this.changeValue();
|
||||
} } as SFNumberWidgetSchema },
|
||||
toPay: { type: 'number', title: '到付', default: 0, ui: { prefix: '¥',change: ()=> {
|
||||
this.changeValue();
|
||||
} } as SFNumberWidgetSchema },
|
||||
oilCardPay: { type: 'number', title: '油卡', default: 0, ui: { prefix: '¥',change: ()=> {
|
||||
this.changeValue();
|
||||
} } as SFNumberWidgetSchema },
|
||||
receiptPay: { type: 'number', title: '回单付', default: 0, ui: { prefix: '¥',change: ()=> {
|
||||
this.changeValue();
|
||||
} } as SFNumberWidgetSchema },
|
||||
oilCardPay2: {
|
||||
type: 'string',
|
||||
title: '小计',
|
||||
@ -431,7 +443,8 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
|
||||
this.startInfo.push({
|
||||
detailedAddress: '',
|
||||
appUserName: '',
|
||||
contractTelephone: ''
|
||||
contractTelephone: '',
|
||||
type: 1
|
||||
});
|
||||
}
|
||||
subStartInfo(event: any, index: number) {
|
||||
@ -442,7 +455,8 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
|
||||
this.endInfo.push({
|
||||
detailedAddress: '',
|
||||
appUserName: '',
|
||||
contractTelephone: ''
|
||||
contractTelephone: '',
|
||||
type: 2
|
||||
});
|
||||
}
|
||||
subEndInfo(event: any, index: number) {
|
||||
@ -463,13 +477,34 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
|
||||
this.validateForm1.controls[key].updateValueAndValidity();
|
||||
});
|
||||
console.log(this.validateForm1);
|
||||
var d = new Date(this.validateForm1.value.createTime);
|
||||
console.log(d.getFullYear() + '-' + (d.getMonth() + 1) + '-' + d.getDate() + ' ' + d.getHours() + ':' + d.getMinutes() + ':' + d.getSeconds())
|
||||
|
||||
|
||||
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()
|
||||
}
|
||||
console.log(typeof(this.validateForm1.value.createTime) === 'string')
|
||||
if (this.validateForm1.invalid) {
|
||||
return;
|
||||
}
|
||||
console.log(this.sf1.value)
|
||||
console.log({...this.sf4.value, ...this.sf3.value})
|
||||
this.startInfo.createTime = this.validateForm1.value.createTime
|
||||
this.startInfo.modifyTime = this.validateForm1.value.modifyTime
|
||||
const params = {
|
||||
...this.sf1.value,
|
||||
...this.sf5.value,
|
||||
shippingInformationDTO: {
|
||||
...this.sf7.value
|
||||
},
|
||||
unLoadingPlaceList: [...this.startInfo, ...this.endInfo,],
|
||||
goodsInfoList: [
|
||||
{...this.sf4.value, ...this.sf3.value}
|
||||
]
|
||||
}
|
||||
console.log(params)
|
||||
console.log(this.startInfo)
|
||||
console.log(this.endInfo)
|
||||
console.log(this.validateForm1.value)
|
||||
@ -478,22 +513,35 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
|
||||
console.log(this.sf5.value)
|
||||
console.log(this.sf6.value)
|
||||
console.log(this.sf7.value)
|
||||
// const data = this.form.value;
|
||||
// this.http.post('/register', data).subscribe(() => {
|
||||
// this.router.navigateByUrl('/passport/register-result', {
|
||||
// // queryParams: { email: data.mail },
|
||||
// });
|
||||
// });
|
||||
// this.router.navigateByUrl('/passport/register-result', {
|
||||
// // queryParams: { email: data.mail },
|
||||
// });
|
||||
this.service.request(this.service.$api_set_saveAnotherWholeOrder, params).subscribe((res: any) => {
|
||||
console.log(res)
|
||||
})
|
||||
}
|
||||
|
||||
openMap() {
|
||||
this.modalService.create({
|
||||
openMap(type: string, index: number) {
|
||||
const modalRef = this.modalService.create({
|
||||
nzTitle: '',
|
||||
nzContent: AmapPoiPickerComponent,
|
||||
nzWidth: 848
|
||||
nzWidth: 900,
|
||||
nzOnOk: item => {
|
||||
const poi = item.poi;
|
||||
console.log(item)
|
||||
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];
|
||||
break;
|
||||
case 'end':
|
||||
this.endInfo[index].detailedAddress = poi.district + poi.name;
|
||||
this.endInfo[index].longitude = locList[0];
|
||||
this.endInfo[index].latitude = locList[1];
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
goBack() {
|
||||
@ -502,12 +550,11 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
|
||||
// 初始化信息
|
||||
initdata() {
|
||||
console.log(this.id)
|
||||
// this.service.request(`${this.service.$api_get_getCompleteVehicleDetail}`, {id:this.id}).subscribe((res) => {
|
||||
this.service.request(`${this.service.$api_get_getBulkDetail}`, {id:this.id}).subscribe((res) => {
|
||||
this.service.request(`${this.service.$api_get_getCompleteVehicleDetail}`, {id:this.id}).subscribe((res) => {
|
||||
console.log(res)
|
||||
// this.dataList = res;
|
||||
this.sf1data = {
|
||||
shipperAppUserNmae: res?.shipperAppUserNmae || '',
|
||||
// shipperAppUserName: res?.shipperAppUserName || '',
|
||||
enterpriseProjectName: res?.enterpriseProjectName || '',
|
||||
enterpriseInfoName: res?.enterpriseInfoName || '',
|
||||
externalResourceCode: res?.externalResourceCode || '',
|
||||
@ -515,43 +562,52 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
|
||||
}
|
||||
res.unLoadingPlaceList.forEach((element: any) => {
|
||||
if(element.type === 1) {
|
||||
this.startInfo.push({
|
||||
detailedAddress: element.detailedAddress,
|
||||
appUserName: element.appUserName,
|
||||
contractTelephone: element.contractTelephone,
|
||||
})
|
||||
console.log(element)
|
||||
if(this.id) {
|
||||
this.startInfo.push({
|
||||
detailedAddress: element.detailedAddress,
|
||||
appUserName: element.appUserName,
|
||||
contractTelephone: element.contractTelephone,
|
||||
type: element.type
|
||||
})
|
||||
} else {
|
||||
this.startInfo.push({
|
||||
detailedAddress: element.detailedAddress,
|
||||
appUserName: element.appUserName,
|
||||
contractTelephone: element.contractTelephone,
|
||||
type: element.type,
|
||||
id: element.id
|
||||
})
|
||||
}
|
||||
if(element.createTime) {
|
||||
this.creatTime = element.createTime
|
||||
this.creatTime = element.modifyTime
|
||||
this.creatTime = element?.createTime
|
||||
this.modifyTime = element?.modifyTime
|
||||
}
|
||||
} else if(element.type === 2) {
|
||||
this.endInfo.push({
|
||||
detailedAddress: element.detailedAddress,
|
||||
appUserName: element.appUserName,
|
||||
contractTelephone: element.contractTelephone,
|
||||
detailedAddress: element?.detailedAddress,
|
||||
appUserName: element?.appUserName,
|
||||
contractTelephone: element?.contractTelephone,
|
||||
type: element.type
|
||||
})
|
||||
}
|
||||
});
|
||||
this.sf3data = {
|
||||
goodsNameId: res?.goodsInfoList.goodsNameId || '',
|
||||
weight: res?.goodsInfoList.weight || '',
|
||||
volume: res?.goodsInfoList.volume || '',
|
||||
externalResourceCode: res?.goodsInfoList.goodsNameId || '',
|
||||
goodsNameId: res?.goodsInfoList[0]?.goodsNameId || '',
|
||||
}
|
||||
this.sf4data = {
|
||||
goodsNameId: res?.goodsInfoList.goodsNameId || '',
|
||||
weight: res?.goodsInfoList.weight || '',
|
||||
volume: res?.goodsInfoList.volume || '',
|
||||
externalResourceCode: res?.goodsInfoList.goodsNameId || '',
|
||||
weight: res?.goodsInfoList[0]?.weight || '',
|
||||
volume: res?.goodsInfoList[0]?.volume || '',
|
||||
vehicleDemand: res?.goodsInfoList[0]?.vehicleDemand || '',
|
||||
}
|
||||
this.sf5data = {
|
||||
goodsValue: res?.goodsValue || '',
|
||||
}
|
||||
this.sf6data = {
|
||||
stateReceipt: res?.supplementaryInformationVO.stateReceipt || '',
|
||||
remarks: res?.supplementaryInformationVO.remarks || '',
|
||||
stateReceipt: res?.supplementaryInformationVO?.stateReceipt || '',
|
||||
remarks: res?.supplementaryInformationVO?.remarks || '',
|
||||
}
|
||||
console.log('99999')
|
||||
console.log(res?.shippingInformationVO)
|
||||
this.sf7data = {
|
||||
prePay: res?.shippingInformationVO?.prePay || '',
|
||||
toPay: res?.shippingInformationVO?.toPay || '',
|
||||
@ -559,9 +615,9 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
|
||||
receiptPay: res?.shippingInformationVO?.receiptPay || '',
|
||||
oilCardPay2: res?.shippingInformationVO?.oilCardPay || '',
|
||||
appendFee: res?.shippingInformationVO?.appendFee || '',
|
||||
totalFee: res?.shippingInformationVO?.totalFee || '',
|
||||
name8: res?.shippingInformationVO?.appendFee || '',
|
||||
}
|
||||
this.totalFees = res?.shippingInformationVO?.totalFee || '0';
|
||||
// <p>预付:{{dataList?.shippingInformationVO?.prePay | currency: '¥' }}</p>
|
||||
// <p>油卡:{{dataList?.shippingInformationVO?.oilCardPay | currency: '¥'}}</p>
|
||||
// <p>到付:{{dataList?.shippingInformationVO?.toPay | currency: '¥'}}</p>
|
||||
@ -579,4 +635,8 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
|
||||
|
||||
})
|
||||
}
|
||||
asds(i: any) {
|
||||
console.log(i)
|
||||
}
|
||||
// const data =
|
||||
}
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
<!--
|
||||
* @Author: your name
|
||||
* @Date: 2021-12-03 11:10:14
|
||||
* @LastEditTime: 2021-12-08 09:57:47
|
||||
* @LastEditTime: 2021-12-09 10:59:41
|
||||
* @LastEditors: Please set LastEditors
|
||||
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
||||
* @FilePath: \tms-obc-web\src\app\routes\supply-management\components\vehicle\vehicle.component.html
|
||||
@ -67,9 +67,16 @@ size="small"
|
||||
<ng-template st-row="resourceCode" let-item let-index="index">
|
||||
<a [routerLink]="'/supply-management/vehicle-detail/'+item.id">{{item.resourceCode}}</a>
|
||||
</ng-template>
|
||||
<ng-template st-row="vehicleDemand" let-item let-index="index">
|
||||
|
||||
<div *ngFor="let i of item?.vehicleDemand">
|
||||
<span>{{item?.vehicleDemand.i}}66{{i}}</span>
|
||||
</div>
|
||||
</ng-template>
|
||||
<ng-template st-row="LoadingAddressArr" let-item let-index="index">
|
||||
<div *ngFor="let i of item?.LoadingAddressArr">
|
||||
<span>{{item?.LoadingAddressArr[i]}}</span>
|
||||
<span>{{i?.maxCube}}</span>
|
||||
<span>{{i?.maxWeight}}</span>
|
||||
</div>
|
||||
</ng-template>
|
||||
<ng-template st-row="serviceType" let-item let-index="index">
|
||||
|
||||
@ -238,6 +238,7 @@ export class SupplyManagementVehicleComponent implements OnInit {
|
||||
index: 'vehicleDemand',
|
||||
className: 'text-center',
|
||||
width: '120px',
|
||||
render: 'vehicleDemand'
|
||||
},
|
||||
{
|
||||
title: '总费用',
|
||||
@ -448,8 +449,10 @@ export class SupplyManagementVehicleComponent implements OnInit {
|
||||
})
|
||||
}
|
||||
nextOrder(item: any) {
|
||||
this.router.navigate(['/supply-management/vehicle-amend', item.id], {
|
||||
relativeTo: this.ar
|
||||
this.router.navigate(['/supply-management/vehicle-amend', item.id,],{
|
||||
queryParams: {
|
||||
sta: 2
|
||||
},
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/*
|
||||
* @Author: your name
|
||||
* @Date: 2021-12-03 11:10:14
|
||||
* @LastEditTime: 2021-12-08 16:55:10
|
||||
* @LastEditTime: 2021-12-09 10:56:28
|
||||
* @LastEditors: Please set LastEditors
|
||||
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
||||
* @FilePath: \tms-obc-web\src\app\routes\supply-management\services\supply-management.service.ts
|
||||
@ -14,13 +14,17 @@ import { BaseService } from 'src/app/shared/services';
|
||||
})
|
||||
export class SupplyManagementService extends BaseService {
|
||||
// 整车获取货源表详情
|
||||
$api_get_getCompleteVehicleDetail = `/api/sdc/goodsResourceOperate/getCompleteVehicleDetail`;
|
||||
$api_get_getCompleteVehicleDetail = `/api/sdc/goodsResourceOperate/getWholeDetail`;
|
||||
// 大宗获取货源表详情
|
||||
$api_get_getBulkDetail = `/api/sdc/goodsResourceOperate/getBulkDetail`;
|
||||
// 查询运营后台大宗货源列表
|
||||
$api_get_bulkPage_list = `/api/sdc/goodsResourceOperate/list/bulkPage`;
|
||||
// 查询运营后台整车货源列表
|
||||
$api_get_wholePage_list = `/api/sdc/goodsResourceOperate/list/wholePage`;
|
||||
// 整车再下一单
|
||||
$api_set_saveAnotherWholeOrder = `/api/sdc/goodsResourceOperate/saveAnotherWholeOrder`;
|
||||
// 大宗再下一单
|
||||
$api_set_saveAnotherBulkOrder = `/api/sdc/goodsResourceOperate/saveAnotherBulkOrder`;
|
||||
|
||||
constructor(public injector: Injector) {
|
||||
super(injector)
|
||||
|
||||
Reference in New Issue
Block a user