From 082f72f965b21ca03475aed1eb3b1a24db36b167 Mon Sep 17 00:00:00 2001 From: zzyuan <781948537@qq.com> Date: Fri, 13 Dec 2024 17:09:28 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E8=AF=95=E5=85=A5=E5=BA=93=E9=A9=B3?= =?UTF-8?q?=E5=9B=9E=E5=8E=9F=E5=9B=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../testedInBound/component/editApply.vue | 240 ++++++++++-------- 1 file changed, 139 insertions(+), 101 deletions(-) diff --git a/src/views/material/repair/testedInBound/component/editApply.vue b/src/views/material/repair/testedInBound/component/editApply.vue index c207c3be..4c613015 100644 --- a/src/views/material/repair/testedInBound/component/editApply.vue +++ b/src/views/material/repair/testedInBound/component/editApply.vue @@ -13,33 +13,8 @@ 搜索 重置 - - - - + + @@ -50,7 +25,6 @@ @@ -83,14 +57,14 @@ -
+
驳回数量:
驳回原因: -
@@ -118,17 +92,42 @@ 重置 - - + + + 入库 + + + 驳回 + + + + - + + @@ -211,6 +226,8 @@ export default { isReject: false, keyWord:"", maCodeList: [], + codeOpen: false, + codeRow:{} }; }, computed: {}, @@ -237,7 +254,6 @@ export default { this.loading = false; }); }, - //入库按钮 handlePass(row) { console.log(row) @@ -280,7 +296,7 @@ export default { }); } }, - //驳回按钮 + //驳回按钮-打开弹窗 handleFail(row) { console.log(row) console.log(row.manageType) @@ -297,7 +313,7 @@ export default { this.open=true; } }, - //数量入库驳回入库 + //驳回按钮-数量入库-确认驳回 rejectNumInput(){ console.log(this.rowData) console.log(this.numInput2) @@ -313,6 +329,7 @@ export default { agreementId:this.rowData.agreementId, taskId:this.rowData.taskId, typeId:this.rowData.typeId, + rejectReason:this.rejectReason, pendingInputNum:this.rowData.pendingInputNum, rejectNum:this.numInput2 } @@ -325,7 +342,7 @@ export default { }); } }, - //查看编码列表 + //查看编码列表-打开编码列表弹窗 handleViewCode(row){ this.rowData=row; this.isReject=true; @@ -348,7 +365,7 @@ export default { } }); }, - //重置按钮 + //编码列表弹窗-重置按钮 resetCodeQuery(){ this.keyWord="" this.queryCodeList() @@ -374,15 +391,97 @@ export default { }) .catch(() => {}); }, - //编码弹窗-单个驳回 + //编码弹窗-单个驳回-打开驳回弹窗 rejectCodeWarehouse(codeRow){ console.log(this.rowData) console.log(codeRow) + this.rejectReason=""; + this.codeOpen=true; + this.codeRow=codeRow + // let param = { + // agreementId:this.rowData.agreementId, + // taskId:this.rowData.taskId, + // typeId:this.rowData.typeId, + // maCodeList:[{maId:codeRow.maId}] + // } + // this.$modal.confirm("是否确认驳回所选择的设备编码?") + // .then(function () { + // return rejectWarehouseApi(param); + // }).then((response) => { + // if(response.code==200){ + // this.$modal.msgSuccess("驳回成功"); + // this.queryCodeList(); + // this.getTaskInfo(); + // } + // }) + // .catch(() => {}); + }, + //编码弹窗-单个驳回-打开驳回弹窗-确认按钮 + confirmRejectCode(){ let param = { agreementId:this.rowData.agreementId, taskId:this.rowData.taskId, typeId:this.rowData.typeId, - maCodeList:[{maId:codeRow.maId}] + rejectReason:this.rejectReason, + maCodeList:[{maId:this.codeRow.maId}] + } + rejectWarehouseApi(param).then((response) => { + if(response.code==200){ + this.$modal.msgSuccess("驳回成功"); + this.codeOpen=false; + this.queryCodeList(); + this.getTaskInfo(); + } + }) + }, + //是否可用勾选框 + selectable(row) { + if (row.maStatus == "5") { + return true; + } else { + return false; + } + }, + // 多选框选中数据 + handleSelectionChange(selection) { + this.passTemp = []; + this.failTemp = []; + this.ids = selection.map((item) => item.id); + selection.forEach((item) => { + this.passTemp.push({maId:item.maId}); + }); + selection.forEach((item) => { + this.failTemp.push({maId:item.maId}); + }); + this.single = selection.length != 1; + this.multiple = !selection.length; + }, + //编码弹窗-多个通过 + handlePassAll() { + let param = { + taskId:this.rowData.taskId, + typeId:this.rowData.typeId, + maCodeList:this.passTemp + } + this.$modal.confirm("是否确认入库所选择的设备编码?") + .then(function () { + return repairInputWarehouseApi(param); + }).then((response) => { + if(response.code==200){ + this.$modal.msgSuccess("入库成功"); + this.queryCodeList(); + this.getTaskInfo(); + } + }) + .catch(() => {}); + }, + //编码弹窗-多个驳回 + handleFailAll() { + let param = { + agreementId:this.rowData.agreementId, + taskId:this.rowData.taskId, + typeId:this.rowData.typeId, + maCodeList:this.failTemp } this.$modal.confirm("是否确认驳回所选择的设备编码?") .then(function () { @@ -396,67 +495,6 @@ export default { }) .catch(() => {}); }, - //是否可用勾选框 - selectable(row) { - if (row.status == "0") { - return true; - } else { - return false; - } - }, - // 多选框选中数据 - handleSelectionChange(selection) { - this.passTemp = []; - this.failTemp = []; - this.ids = selection.map((item) => item.id); - selection.forEach((item) => { - this.passTemp.push({ id: item.id, status: "1",specificationType: item.specificationType,machineTypeName:item.machineTypeName, - unitName:item.unitName,repairNum:item.repairNum,repairedNum:item.repairedNum,typeId:item.typeId,taskId:item.taskId, - auditId:item.id,repairId:item.repairId,maId:item.maId, }); - }); - selection.forEach((item) => { - this.failTemp.push({ id: item.id, status: "2",specificationType: item.specificationType,machineTypeName:item.machineTypeName, - unitName:item.unitName,repairNum:item.repairNum,repairedNum:item.repairedNum,typeId:item.typeId,taskId:item.taskId, - auditId:item.id,repairId:item.repairId,maId:item.maId, }); - }); - this.single = selection.length != 1; - this.multiple = !selection.length; - console.log(this.multiple) - }, - //多个通过 - handlePassAll() { - if (this.ids.length == 0) { - this.$alert("请至少勾选一条入库数据", "提示", { - type: "warning", - confirmButtonText: "确定", - }); - return; - } else { - // auditPass(this.passTemp).then((response) => { - // if (response.code == 200) { - // this.$modal.msgSuccess("通过成功"); - // } - // this.getTaskInfo(); - // }); - } - }, - //多个驳回 - handleFailAll() { - if (this.ids.length == 0) { - this.$alert("请至少勾选一条入库数据", "提示", { - type: "warning", - confirmButtonText: "确定", - }); - return; - } else { - // auditPass(this.failTemp).then((response) => { - // if (response.code == 200) { - // this.$modal.msgSuccess("驳回成功"); - // } - // this.getTaskInfo(); - // }); - } - }, },