|
|
|
@ -175,7 +175,7 @@ |
|
|
|
</el-row> |
|
|
|
</el-form> |
|
|
|
<span slot="footer" class="dialog-footer"> |
|
|
|
<el-button type="primary" @click="saveUploadFile">保存</el-button> |
|
|
|
<el-button type="primary" :disabled="isLoading" @click="saveUploadFile">{{ isLoading ? '保存中...' : '保存'}}</el-button> |
|
|
|
<el-button type="primary" @click="closeUploadDialog">关闭</el-button> |
|
|
|
</span> |
|
|
|
</el-dialog> |
|
|
|
@ -210,6 +210,7 @@ export default { |
|
|
|
// 导入 |
|
|
|
titleCon: '文件导入', |
|
|
|
visible: false, |
|
|
|
isLoading: false, |
|
|
|
fileList: [], |
|
|
|
// 条件查询 |
|
|
|
searchData: { |
|
|
|
@ -1049,6 +1050,7 @@ export default { |
|
|
|
|
|
|
|
// 保修当前的数据 |
|
|
|
saveUploadFile () { |
|
|
|
this.isLoading = true |
|
|
|
// 判断文件是否上传 |
|
|
|
if (null == this.fileList || 0 === this.fileList.length) { |
|
|
|
this.$message.error("请先上传文件!") |
|
|
|
@ -1061,10 +1063,13 @@ export default { |
|
|
|
savePartCostComponentByExcel(formData).then(({data}) => { |
|
|
|
if (data.code === 0) { |
|
|
|
this.$message.success(data.msg) |
|
|
|
this.getDataList() |
|
|
|
// 关闭窗口并刷新页面 |
|
|
|
this.closeUploadDialog() |
|
|
|
this.isLoading = false |
|
|
|
} else { |
|
|
|
this.$message.warning(data.msg) |
|
|
|
this.isLoading = false |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
|