diff --git a/src/views/modules/orderIssure/soIssueNotify/searchIssureNotify.vue b/src/views/modules/orderIssure/soIssueNotify/searchIssureNotify.vue index 1e56aac..122e1b1 100644 --- a/src/views/modules/orderIssure/soIssueNotify/searchIssureNotify.vue +++ b/src/views/modules/orderIssure/soIssueNotify/searchIssureNotify.vue @@ -2959,6 +2959,9 @@ }); }, closeNotifyModel(row){ + // 先更新当前行数据 + this.currentRow = JSON.parse(JSON.stringify(row)) + this.closeData.site=row.site this.closeData.notifyNo=row.notifyNo this.closeData.closeRemark='' @@ -2997,6 +3000,9 @@ }) }, deleteNotifyConfirm(row){ + // 先更新当前行数据 + this.currentRow = JSON.parse(JSON.stringify(row)) + this.$confirm('确认删除?', '提示', { confirmButtonText: '确定', cancelButtonText: '取消', @@ -3948,6 +3954,9 @@ }, editNotifyMaterialFun(row){ + // 先更新当前行数据,确保使用的是点击行的数据 + this.currentRow = JSON.parse(JSON.stringify(row)) + // 先查询该行的材料汇总数据,校验是否有合计已发数量大于零 searchSumNotifyMaterialList(row).then(({data}) => { if (data && data.code === 0 && data.rows && data.rows.length > 0) { @@ -3963,9 +3972,6 @@ } // 校验通过,继续执行编辑操作 - // 设置当前行为要编辑的行 - this.currentRow = JSON.parse(JSON.stringify(row)); - editNotifyMaterial(row).then(({data})=>{ if (data.code === 0) { //刷新主表数据 diff --git a/src/views/modules/qc/inboundNotification.vue b/src/views/modules/qc/inboundNotification.vue index b911c3a..7f10b3d 100644 --- a/src/views/modules/qc/inboundNotification.vue +++ b/src/views/modules/qc/inboundNotification.vue @@ -1538,6 +1538,9 @@ }, updateModal (row) { + // 先更新当前行数据,确保使用的是点击行的数据 + this.currentRow = JSON.parse(JSON.stringify(row)) + if (this.currentRow.orderType === '采购入库' || this.currentRow.orderType === '销售退货') { this.$message.warning('该类型单据不能编辑!') return @@ -1678,6 +1681,9 @@ // 关闭 closeModal (row) { + // 先更新当前行数据 + this.currentRow = JSON.parse(JSON.stringify(row)) + if (this.currentRow.orderType === '采购入库' || this.currentRow.orderType === '销售退货') { this.$message.warning('该类型单据不能编辑!') return @@ -1694,6 +1700,9 @@ // 下达 issueModal (row) { + // 先更新当前行数据 + this.currentRow = JSON.parse(JSON.stringify(row)) + if (this.currentRow.orderType === '采购入库' || this.currentRow.orderType === '销售退货') { this.$message.warning('该类型单据不能编辑!') return diff --git a/src/views/modules/qc/outboundNotification.vue b/src/views/modules/qc/outboundNotification.vue index e9b5ded..3b583da 100644 --- a/src/views/modules/qc/outboundNotification.vue +++ b/src/views/modules/qc/outboundNotification.vue @@ -248,7 +248,7 @@ - + { + if (this.modalData.orderType === '采购退货') { + callback() + } else if (!value || value === '') { + callback(new Error(' ')) + } else { + callback() + } + } } ], departmentNo: [ @@ -1502,6 +1512,9 @@ }, updateModal (row) { + // 先更新当前行数据,确保使用的是点击行的数据 + this.currentRow = JSON.parse(JSON.stringify(row)) + if (this.currentRow.orderType === '销售出库') { this.$message.warning('销售出库单据不能编辑!') return @@ -1611,6 +1624,11 @@ // 删除 deleteModal () { + // 先更新当前行数据,确保校验的是当前选中行的数据 + if (this.outboundSelection.length > 0) { + this.currentRow = JSON.parse(JSON.stringify(this.outboundSelection[0])) + } + if (this.currentRow.orderType === '销售出库') { this.$message.warning('销售出库单据不能编辑!') return @@ -1718,6 +1736,9 @@ // 关闭 closeModal (row) { + // 先更新当前行数据 + this.currentRow = JSON.parse(JSON.stringify(row)) + if (this.currentRow.orderType === '销售出库') { this.$message.warning('销售出库单据不能编辑!') return @@ -1734,6 +1755,9 @@ // 下达 issueModal (row) { + // 先更新当前行数据 + this.currentRow = JSON.parse(JSON.stringify(row)) + if (this.currentRow.orderType === '销售出库') { this.$message.warning('销售出库单据不能编辑!') return @@ -2074,6 +2098,10 @@ onOrderTypeChange () { this.modalData.customerId = '' this.modalData.customerName = '' + // 如果是采购退货,清空出库类别 + if (this.modalData.orderType === '采购退货') { + this.modalData.category = '' + } }, chooseWareHouse (row) {