|
@@ -17,7 +17,7 @@ export class BasedataMaterialFileAddComponent implements OnInit {
|
|
|
@Input() isOne = 0;
|
|
|
@Input() materialId = '';
|
|
|
|
|
|
-
|
|
|
+
|
|
|
baseMaterialFileClassification: BaseMaterialFileClassification = {
|
|
|
id: '',
|
|
|
code: '',
|
|
@@ -66,18 +66,21 @@ export class BasedataMaterialFileAddComponent implements OnInit {
|
|
|
submitForm() {
|
|
|
|
|
|
if (this.isOne == 2) {
|
|
|
-
|
|
|
- this.baseMaterialFileClassificationService.update(this.baseMaterialFileClassification).then(res => {
|
|
|
- if (res.success) {
|
|
|
- this.notification.success(this.i18NService.fanyi('successful.revision'), '');
|
|
|
- this.modal.destroy();
|
|
|
- } else {
|
|
|
- this.notification.error(
|
|
|
- this.i18NService.fanyi('modification.failed'),
|
|
|
- messageShared(this.i18NService, res.message),
|
|
|
- );
|
|
|
- }
|
|
|
+ return new Promise(resolve => {
|
|
|
+
|
|
|
+ this.baseMaterialFileClassificationService.update(this.baseMaterialFileClassification).then(res => {
|
|
|
+ if (res.success) {
|
|
|
+ this.notification.success(this.i18NService.fanyi('successful.revision'), '');
|
|
|
+ this.modal.destroy();
|
|
|
+ } else {
|
|
|
+ this.notification.error(
|
|
|
+ this.i18NService.fanyi('modification.failed'),
|
|
|
+ messageShared(this.i18NService, res.message),
|
|
|
+ );
|
|
|
+ }
|
|
|
+ });
|
|
|
});
|
|
|
+
|
|
|
} else {
|
|
|
|
|
|
return new Promise(resolve => {
|