|
|
|
@ -168,7 +168,7 @@ |
|
|
|
</el-form-item> |
|
|
|
</el-form> |
|
|
|
<el-footer style="height:35px;margin-top: 25px;text-align:center"> |
|
|
|
<el-button type="primary" @click="saveData()">保存</el-button> |
|
|
|
<el-button type="primary" :loading="saveLoading" @click="saveData()">保存</el-button> |
|
|
|
<el-button type="primary" @click="modalFlag = false">关闭</el-button> |
|
|
|
</el-footer> |
|
|
|
</el-dialog> |
|
|
|
@ -1119,6 +1119,7 @@ |
|
|
|
fastAddFlag: false, |
|
|
|
loading: false, |
|
|
|
attributeDialog: true, |
|
|
|
saveLoading: false |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
@ -1511,10 +1512,12 @@ |
|
|
|
return |
|
|
|
} |
|
|
|
if (this.modalData.flag === '1') { |
|
|
|
this.saveLoading = true |
|
|
|
masterPartInformationSave(this.modalData).then(({data}) => { |
|
|
|
if (data && data.code === 0) { |
|
|
|
this.getDataList() |
|
|
|
this.modalFlag = false |
|
|
|
this.saveLoading = false |
|
|
|
this.$message({ |
|
|
|
message: '操作成功', |
|
|
|
type: 'success', |
|
|
|
@ -1522,16 +1525,21 @@ |
|
|
|
onClose: () => {} |
|
|
|
}) |
|
|
|
} else { |
|
|
|
this.saveLoading = false |
|
|
|
this.$alert(data.msg, '错误', { |
|
|
|
confirmButtonText: '确定' |
|
|
|
}) |
|
|
|
} |
|
|
|
}).catch(()=>{ |
|
|
|
this.saveLoading = false |
|
|
|
}) |
|
|
|
} else { |
|
|
|
this.saveLoading = true |
|
|
|
masterPartInformationEdit(this.modalData).then(({data}) => { |
|
|
|
if (data && data.code === 0) { |
|
|
|
this.getDataList() |
|
|
|
this.modalFlag = false |
|
|
|
this.saveLoading = false |
|
|
|
this.$message({ |
|
|
|
message: '操作成功', |
|
|
|
type: 'success', |
|
|
|
@ -1539,10 +1547,13 @@ |
|
|
|
onClose: () => {} |
|
|
|
}) |
|
|
|
} else { |
|
|
|
this.saveLoading = false |
|
|
|
this.$alert(data.msg, '错误', { |
|
|
|
confirmButtonText: '确定' |
|
|
|
}) |
|
|
|
} |
|
|
|
}).catch(()=>{ |
|
|
|
this.saveLoading = false |
|
|
|
}) |
|
|
|
} |
|
|
|
}, |
|
|
|
|