fix bug
This commit is contained in:
@ -52,6 +52,7 @@ export class SupplyManagementReleasePublishComponent implements OnInit {
|
||||
totalTime = 0.0; //路程总时间
|
||||
currentRate = 0; //实时计算的费率
|
||||
shipperName = '';
|
||||
patternStr = `^((13[0-9])|(14[0-1,4-9])|(15([0-3,5-9]))|(17[0-8])|(18[0-9])|(19[0-3,5-9])|(16[2,5,6,7]))\\d{8}$`;
|
||||
constructor(
|
||||
private http: _HttpClient,
|
||||
fb: FormBuilder,
|
||||
@ -67,10 +68,10 @@ export class SupplyManagementReleasePublishComponent implements OnInit {
|
||||
this.validateForm1 = fb.group({
|
||||
loadAddress0: [null, [Validators.required]],
|
||||
loadName0: [null, [Validators.required]],
|
||||
loadPhone0: [null, [Validators.required, Validators.pattern('^[0-9]*$')]],
|
||||
loadPhone0: [null, [Validators.required, Validators.pattern(this.patternStr)]],
|
||||
unloadAddress0: [null, [Validators.required]],
|
||||
unloadName0: [null, [Validators.required]],
|
||||
unloadPhone0: [null, [Validators.required, Validators.pattern('^[0-9]*$')]],
|
||||
unloadPhone0: [null, [Validators.required, Validators.pattern(this.patternStr)]],
|
||||
loadingTime: [null, [Validators.required]],
|
||||
unloadingTime: [null, [Validators.required]]
|
||||
});
|
||||
@ -609,7 +610,6 @@ export class SupplyManagementReleasePublishComponent implements OnInit {
|
||||
receiptUserPhone: {
|
||||
type: 'string',
|
||||
title: '联系电话',
|
||||
format: 'mobile',
|
||||
maxLength: 11,
|
||||
ui: {
|
||||
errors: {
|
||||
@ -836,7 +836,7 @@ export class SupplyManagementReleasePublishComponent implements OnInit {
|
||||
});
|
||||
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, Validators.pattern('^[0-9]*$')]));
|
||||
this.validateForm1.addControl(`loadPhone${controlId}`, new FormControl(null, [Validators.required, Validators.pattern(this.patternStr)]));
|
||||
}
|
||||
}
|
||||
// 添加 删除发货卸货地址
|
||||
@ -865,7 +865,7 @@ export class SupplyManagementReleasePublishComponent implements OnInit {
|
||||
this.validateForm1.addControl(`unloadName${controlId}`, new FormControl(null, Validators.required));
|
||||
this.validateForm1.addControl(
|
||||
`unloadPhone${controlId}`,
|
||||
new FormControl(null, [Validators.required, Validators.pattern('^[0-9]*$')])
|
||||
new FormControl(null, [Validators.required, Validators.pattern(this.patternStr)])
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user