diff --git a/src/views/modules/automatedWarehouse/palletMergeQuery.vue b/src/views/modules/automatedWarehouse/palletMergeQuery.vue index 6043c93..a741292 100644 --- a/src/views/modules/automatedWarehouse/palletMergeQuery.vue +++ b/src/views/modules/automatedWarehouse/palletMergeQuery.vue @@ -4,16 +4,16 @@ - - @@ -26,10 +26,10 @@
- {{ submitLoading ? '提交中...' : '提交合托' }} @@ -247,13 +247,13 @@ export default { this.$alert('请选择托盘类型', '提示', { confirmButtonText: '确定' }) return } - + this.dataListLoading = true this.selectedRows = [] if (this.$refs.mainTable) { this.$refs.mainTable.clearSelection() } - + searchPalletMergeList(this.searchData).then(({ data }) => { this.dataListLoading = false if (data && data.code == 0) { @@ -290,25 +290,32 @@ export default { this.$alert('请至少选择2条数据进行合托', '提示', { confirmButtonText: '确定' }) return } - + this.submitLoading = true - - // 调用后端提交合托方法(预留)- rqrq - submitPalletMerge(this.selectedRows).then(({ data }) => { - if (data && data.code === 0) { - this.$message({ - message: '提交成功', - type: 'success', - duration: 1500 - }) - // 刷新列表 - rqrq - this.searchTable() - } else { - this.$alert(data.msg || '提交失败', '错误', { confirmButtonText: '确定' }) - } + this.$confirm(`确定进行[合托]操作?`, '提示', { + confirmButtonText: '确定', + cancelButtonText: '取消', + type: 'warning' + }).then(() => { + // 调用后端提交合托方法(预留)- rqrq + submitPalletMerge(this.selectedRows).then(({data}) => { + if (data && data.code === 0) { + this.$message({ + message: '提交成功', + type: 'success', + duration: 1500 + }) + // 刷新列表 - rqrq + this.searchTable() + } else { + this.$alert(data.msg || '提交失败', '错误', {confirmButtonText: '确定'}) + } + }).catch(() => { + this.$message.error('提交失败') + }).finally(() => { + this.submitLoading = false + }) }).catch(() => { - this.$message.error('提交失败') - }).finally(() => { this.submitLoading = false }) }