edit
This commit is contained in:
@ -100,34 +100,32 @@ export class SupplyManagementBulkReleasePublishComponent implements OnInit {
|
||||
this.initSF4();
|
||||
this.initSF6();
|
||||
this.startInfo = [
|
||||
{
|
||||
detailedAddress: '',
|
||||
appUserName: '',
|
||||
contractTelephone: '',
|
||||
latitude: '',
|
||||
longitude: '',
|
||||
province: '',
|
||||
city: '',
|
||||
area: '',
|
||||
type: '1'
|
||||
}
|
||||
];
|
||||
{
|
||||
detailedAddress: '',
|
||||
appUserName: '',
|
||||
contractTelephone: '',
|
||||
latitude: '',
|
||||
longitude: '',
|
||||
province: '',
|
||||
city: '',
|
||||
area: '',
|
||||
type: '1'
|
||||
}
|
||||
];
|
||||
this.endInfo = [
|
||||
{
|
||||
detailedAddress: '',
|
||||
appUserName: '',
|
||||
contractTelephone: '',
|
||||
latitude: '',
|
||||
longitude: '',
|
||||
province: '',
|
||||
city: '',
|
||||
area: '',
|
||||
type: '2'
|
||||
}
|
||||
]
|
||||
{
|
||||
detailedAddress: '',
|
||||
appUserName: '',
|
||||
contractTelephone: '',
|
||||
latitude: '',
|
||||
longitude: '',
|
||||
province: '',
|
||||
city: '',
|
||||
area: '',
|
||||
type: '2'
|
||||
}
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
|
||||
initSF1() {
|
||||
this.schema1 = {
|
||||
@ -144,28 +142,28 @@ export class SupplyManagementBulkReleasePublishComponent implements OnInit {
|
||||
onSearch: (q: any) => {
|
||||
if (!!q) {
|
||||
return this.service
|
||||
.request(this.service.$api_enterpriceList, { enterpriseName: q})
|
||||
.pipe(map((res: any[]) => (res as any[]).map((i) => ({ label: i.enterpriseName, value: i.id } as SFSchemaEnum))))
|
||||
.request(this.service.$api_enterpriceList, { enterpriseName: q })
|
||||
.pipe(map((res: any[]) => (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: '请选择',
|
||||
allowClear: true,
|
||||
allowClear: true
|
||||
} as SFSelectWidgetSchema
|
||||
},
|
||||
// enterpriseInfoName: {
|
||||
@ -183,11 +181,11 @@ export class SupplyManagementBulkReleasePublishComponent implements OnInit {
|
||||
widget: 'select',
|
||||
placeholder: '请选择',
|
||||
visibleIf: {
|
||||
_$expand: (value: boolean) => value,
|
||||
_$expand: (value: boolean) => value
|
||||
},
|
||||
allowClear: true,
|
||||
asyncData: () => this.shipperSrv.getNetworkFreightForwarder(),
|
||||
},
|
||||
asyncData: () => this.shipperSrv.getNetworkFreightForwarder()
|
||||
}
|
||||
},
|
||||
deadlineTime: {
|
||||
title: '截至日期',
|
||||
@ -464,7 +462,7 @@ export class SupplyManagementBulkReleasePublishComponent implements OnInit {
|
||||
submitParams: item,
|
||||
submitUrl: this.service.$api_save_bulk_assign
|
||||
},
|
||||
nzWidth: 1300,
|
||||
nzWidth: 1300
|
||||
});
|
||||
modalRef.afterClose.subscribe(result => {
|
||||
if (result) {
|
||||
@ -472,16 +470,16 @@ export class SupplyManagementBulkReleasePublishComponent implements OnInit {
|
||||
}
|
||||
});
|
||||
}
|
||||
// 打开下单完成页面
|
||||
openFinishPage(resourceObj: any = null) {
|
||||
this.modalService.create({
|
||||
nzTitle: '',
|
||||
nzContent: PublishSuccessComponent,
|
||||
nzWidth: 900,
|
||||
nzFooter: null,
|
||||
nzComponentParams: { type: 'bulk' }
|
||||
});
|
||||
}
|
||||
// 打开下单完成页面
|
||||
openFinishPage(resourceObj: any = null) {
|
||||
this.modalService.create({
|
||||
nzTitle: '',
|
||||
nzContent: PublishSuccessComponent,
|
||||
nzWidth: 900,
|
||||
nzFooter: null,
|
||||
nzComponentParams: { type: 'bulk' }
|
||||
});
|
||||
}
|
||||
submit(submitType: string): void {
|
||||
// Object.keys(this.validateForm1.controls).forEach(key => {
|
||||
// this.validateForm1.controls[key].markAsDirty();
|
||||
@ -533,26 +531,24 @@ export class SupplyManagementBulkReleasePublishComponent implements OnInit {
|
||||
nzFooter: null,
|
||||
nzComponentParams: { type: 'bulk' }
|
||||
});
|
||||
} else {
|
||||
this.service.msgSrv.error(res.msg);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
// 获取城市列表
|
||||
getRegionCode(regionCode: any) {
|
||||
console.log(regionCode)
|
||||
console.log(regionCode);
|
||||
return this.service
|
||||
.request(this.service.$api_get_enterprise_project, { id: regionCode })
|
||||
.pipe(
|
||||
map((res) =>
|
||||
map(res =>
|
||||
res.map((item: any) => ({
|
||||
label: item.projectName,
|
||||
value: item.id,
|
||||
})),
|
||||
),
|
||||
value: item.id
|
||||
}))
|
||||
)
|
||||
)
|
||||
.subscribe((res) => {
|
||||
.subscribe(res => {
|
||||
this.sf1.getProperty('/enterpriseProjectId')!.schema.enum = res;
|
||||
this.sf1.getProperty('/enterpriseProjectId')!.widget.reset(res);
|
||||
});
|
||||
@ -661,15 +657,15 @@ export class SupplyManagementBulkReleasePublishComponent 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);
|
||||
}
|
||||
} else {
|
||||
this.service.msgSrv.error(res.msg);
|
||||
}
|
||||
});
|
||||
}
|
||||
choose(){
|
||||
choose() {
|
||||
window.history.go(-1);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user