|
|
@@ -1793,13 +1793,16 @@ import tabMixins from '@/mixins/tableColumnsMixin';
|
|
|
});
|
|
|
} else {
|
|
|
contactSave(data)
|
|
|
- .then((id) => {
|
|
|
+ .then(async (id) => {
|
|
|
this.loading = false;
|
|
|
this.$message.success('新增成功');
|
|
|
- this.tableCertificateDataList.forEach((item) => {
|
|
|
+ await Promise.all(this.tableCertificateDataList.map((item) => {
|
|
|
item['holderId'] = id;
|
|
|
item['holder'] = this.form.name;
|
|
|
- saveOrEdit(item);
|
|
|
+ return saveOrEdit(item);
|
|
|
+ })).catch((error) => {
|
|
|
+ this.$message.error('证书资质保存失败,请重试');
|
|
|
+ throw error;
|
|
|
});
|
|
|
|
|
|
if (type == 'sub') {
|