|
|
|
@ -227,10 +227,10 @@ |
|
|
|
</div> |
|
|
|
|
|
|
|
<span slot="footer" class="dialog-footer" style="margin-top: 10px"> |
|
|
|
<el-button v-if="!showPreview" type="primary" @click="saveUploadFile">保存</el-button> |
|
|
|
<el-button v-if="showPreview" type="primary" @click="saveFromPreview">确认保存</el-button> |
|
|
|
<el-button v-if="showPreview" @click="cancelPreview">取消预览</el-button> |
|
|
|
<el-button v-if="!showPreview" type="primary" @click="closeDialog">关闭</el-button> |
|
|
|
<el-button v-if="!showPreview" type="primary" @click="saveUploadFile" :loading="saveButtonLoading" :disabled="saveButtonLoading">保存</el-button> |
|
|
|
<el-button v-if="showPreview" type="primary" @click="saveFromPreview" :loading="confirmSaveButtonLoading" :disabled="confirmSaveButtonLoading">确认保存</el-button> |
|
|
|
<el-button v-if="showPreview" @click="cancelPreview" :disabled="confirmSaveButtonLoading">取消预览</el-button> |
|
|
|
<el-button v-if="!showPreview" type="primary" @click="closeDialog" :disabled="saveButtonLoading">关闭</el-button> |
|
|
|
</span> |
|
|
|
</el-dialog> |
|
|
|
|
|
|
|
@ -528,6 +528,8 @@ |
|
|
|
showPreview: false, // 是否显示预览 |
|
|
|
selectedFile: null, // 选择的文件 |
|
|
|
previewLoading: false, // 预览加载状态 |
|
|
|
saveButtonLoading: false, // 保存按钮加载状态 |
|
|
|
confirmSaveButtonLoading: false, // 确认保存按钮加载状态 |
|
|
|
deletedInvoices: [], // 被删除的发票号列表 |
|
|
|
customSearchData: {}, |
|
|
|
customerList : [],//所有客户 |
|
|
|
@ -975,6 +977,9 @@ |
|
|
|
this.$message.error("请先上传文件!") |
|
|
|
return false |
|
|
|
} |
|
|
|
|
|
|
|
this.saveButtonLoading = true // 开始加载 |
|
|
|
|
|
|
|
const formData = new FormData() |
|
|
|
formData.append("buNo",this.pageData.buNo) |
|
|
|
formData.append("username",this.$store.state.user.name) |
|
|
|
@ -1042,6 +1047,10 @@ |
|
|
|
confirmButtonText: '确定' |
|
|
|
}); |
|
|
|
} |
|
|
|
}).catch(error => { |
|
|
|
this.$message.error('保存失败:' + (error.message || '网络异常')) |
|
|
|
}).finally(() => { |
|
|
|
this.saveButtonLoading = false // 结束加载 |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
@ -1127,6 +1136,8 @@ |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
this.confirmSaveButtonLoading = true // 开始加载 |
|
|
|
|
|
|
|
// 发送保存请求 |
|
|
|
const formData = new FormData() |
|
|
|
formData.append("buNo", this.pageData.buNo) |
|
|
|
@ -1208,6 +1219,10 @@ |
|
|
|
confirmButtonText: '确定' |
|
|
|
}); |
|
|
|
} |
|
|
|
}).catch(error => { |
|
|
|
this.$message.error('保存失败:' + (error.message || '网络异常')) |
|
|
|
}).finally(() => { |
|
|
|
this.confirmSaveButtonLoading = false // 结束加载 |
|
|
|
}); |
|
|
|
}, |
|
|
|
|
|
|
|
|