diff --git a/src/views/inout/receive/DialogNewReceive.vue b/src/views/inout/receive/DialogNewReceive.vue index b96a73f2..ca10d3df 100644 --- a/src/views/inout/receive/DialogNewReceive.vue +++ b/src/views/inout/receive/DialogNewReceive.vue @@ -440,33 +440,34 @@ export default { } }, deleteCodeArray(index, row) { + let _this = this this.$confirm("此操作将永久删除该数据, 是否继续?", "提示", { confirmButtonText: "确定", cancelButtonText: "取消", type: "warning", }).then(() => { - if (this.orderEditor) { - this.detailLoading = true; - if (this.$isNotBlank(row.id)) { + if (_this.formData.billNo) { + _this.detailLoading = true; + if (_this.$isNotBlank(row.id)) { delReceiveDetail({id: row.id}) .then(response => { - this.detailLoading = false; + _this.detailLoading = false; if (response.code === 20000) { - this.getOrderDetailList(); + _this.getOrderDetailList(); } else { - this.$message.error(response.message); + _this.$message.error(response.message); } }) .catch(() => { - this.detailLoading = false; + _this.detailLoading = false; }) } else { - this.$message.success('删除成功'); - this.codeArray.splice(index, 1); + _this.$message.success('删除成功'); + _this.codeArray.splice(index, 1); } } else { - this.$message.success('删除成功'); - this.codeArray.splice(index, 1); + _this.$message.success('删除成功'); + _this.codeArray.splice(index, 1); } }).catch(() => {