diff --git a/src/api/repair/repair.js b/src/api/repair/repair.js index 93eb5d3c..e888815b 100644 --- a/src/api/repair/repair.js +++ b/src/api/repair/repair.js @@ -108,4 +108,13 @@ export function getRepairRecord(query) { method: 'get', params: query }) +} + +// 在修工程查询 +export function getRepairProjectListApi(query) { + return request({ + url: '/material/repair/getRepairProjectList', + method: 'get', + params: query + }) } \ No newline at end of file diff --git a/src/views/material/lease/outBound/index.vue b/src/views/material/lease/outBound/index.vue index c4f536b3..85b3d295 100644 --- a/src/views/material/lease/outBound/index.vue +++ b/src/views/material/lease/outBound/index.vue @@ -209,7 +209,7 @@ - + row.outNum) { + row.preNum = row.outNum + this.$message.error('预出库数量不能大于待出库数量') + return + } // let maxNum = row.pendingNum-row.pendingOutNum let minNum = row.alNum if (row.unitValue == 1) { @@ -1371,17 +1377,31 @@ export default { this.$message.error('预出库数量不能大于可出库数量') return } - const res = await updatePreNum({ - preNum: row.preNum, - parentId: row.parentId, - typeId: row.typeId, - newTypeId: row.newTypeId, - }) - if (res.code == 200) { - // this.$set(row, 'outNum', row.preNum-row.alNum) - this.handleQueryOutView() - this.getList() - this.getOutNum() + let isConfirm = false + try { + // 二次确认 + const confirm = await this.$modal.confirm('是否确认提交?') + isConfirm = confirm == 'confirm' + if (!isConfirm) return + this.loading = true + const res = await updatePreNum({ + preNum: row.preNum, + parentId: row.parentId, + typeId: row.typeId, + newTypeId: row.newTypeId, + publishTask: row.publishTask, + publishNum: row.outNum, + }) + if (res.code == 200) { + // this.$set(row, 'outNum', row.preNum-row.alNum) + this.handleQueryOutView() + this.getList() + this.getOutNum() + } + } catch (error) { + console.log('🚀 ~ checkPreNum ~ error:', error) + } finally { + this.loading = false } }, diff --git a/src/views/material/repair/repairProjectQuery/index.vue b/src/views/material/repair/repairProjectQuery/index.vue new file mode 100644 index 00000000..f50ff841 --- /dev/null +++ b/src/views/material/repair/repairProjectQuery/index.vue @@ -0,0 +1,203 @@ + + + + +