|
|
@ -61,6 +61,7 @@ export class BrandComponent implements OnInit { |
|
|
|
}); |
|
|
|
}); |
|
|
|
this.validateForm = this.fb.group({ |
|
|
|
this.validateForm = this.fb.group({ |
|
|
|
title: [null, [Validators.required]], |
|
|
|
title: [null, [Validators.required]], |
|
|
|
|
|
|
|
goodTypeId: [null, [Validators.required]], |
|
|
|
}); |
|
|
|
}); |
|
|
|
this.getRequest(true, this.searchForm.value); |
|
|
|
this.getRequest(true, this.searchForm.value); |
|
|
|
|
|
|
|
|
|
|
@ -162,6 +163,7 @@ export class BrandComponent implements OnInit { |
|
|
|
this.validateForm.value.img = this.imgFile[0].name; |
|
|
|
this.validateForm.value.img = this.imgFile[0].name; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
console.log(this.validateForm.value); |
|
|
|
if (this.editFlag) { |
|
|
|
if (this.editFlag) { |
|
|
|
this.validateForm.value.id = this.id; |
|
|
|
this.validateForm.value.id = this.id; |
|
|
|
this.config.updateBrand(this.validateForm.value, data => { |
|
|
|
this.config.updateBrand(this.validateForm.value, data => { |
|
|
@ -174,7 +176,6 @@ export class BrandComponent implements OnInit { |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
console.log('123'); |
|
|
|
|
|
|
|
this.config.insertBrand(this.validateForm.value, data => { |
|
|
|
this.config.insertBrand(this.validateForm.value, data => { |
|
|
|
if (data['return_code'] === '000000') { |
|
|
|
if (data['return_code'] === '000000') { |
|
|
|
this.isVisible = false; |
|
|
|
this.isVisible = false; |
|
|
|