From 97b720e1544a0ea4dd9c0e4c92ced2793c603983 Mon Sep 17 00:00:00 2001 From: hayu <1604366271@qq.com> Date: Tue, 20 Jan 2026 17:02:19 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E8=B4=AD=E5=85=A5=E5=BA=93=EF=BC=8C?= =?UTF-8?q?=E7=BC=96=E7=A0=81=E5=85=A5=E5=BA=93=E9=A1=B5=E9=9D=A2=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E5=88=86=E9=A1=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../material/purchase/goodsEntry/detail.vue | 179 ++++++++++++------ 1 file changed, 126 insertions(+), 53 deletions(-) diff --git a/src/views/material/purchase/goodsEntry/detail.vue b/src/views/material/purchase/goodsEntry/detail.vue index 4b56d135..0941c60c 100644 --- a/src/views/material/purchase/goodsEntry/detail.vue +++ b/src/views/material/purchase/goodsEntry/detail.vue @@ -201,36 +201,59 @@ - - - 入库 - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + 入库 + + + + + + + + + + + + + + + + + @@ -308,7 +331,13 @@ export default { codeRowData:{}, codeTableData:[], inPutList:[], - purchaseCheckInfo: null + purchaseCheckInfo: null, + // 分页相关 + codeQueryParams: { + pageNum: 1, + pageSize: 10 + }, + codeTotal: 0, }; }, mounted() { @@ -396,15 +425,24 @@ export default { pass(row) { if(row.manageType==0){//编码 this.codeRowData=row - let param={ - taskId:this.taskId, - typeId:this.codeRowData.typeId + // let param={ + // taskId:this.taskId, + // typeId:this.codeRowData.typeId + // } + // getMachineById(param).then((res)=>{ + // console.log("11111",res.data) + // this.codeTableData=res.data + // this.inPutList=[] + // this.openCode=true + // }) + // 重置分页参数 + this.codeQueryParams = { + pageNum: 1, + pageSize: 10, + maCode: undefined } - getMachineById(param).then((res)=>{ - this.codeTableData=res.data - this.inPutList=[] - this.openCode=true - }) + this.getCodeList() + this.openCode = true }else{ const inputNum = Number(row.checkNum) - Number(row.inputNum) let obj = { @@ -432,6 +470,48 @@ export default { }).catch(() => {}); } }, + // 获取编码列表(分页) + getCodeList() { + this.codeLoading = true + let param = { + taskId: this.taskId, + typeId: this.codeRowData.typeId, + pageNum: this.codeQueryParams.pageNum, + pageSize: this.codeQueryParams.pageSize, + maCode: this.codeQueryParams.maCode + } + + getMachineById(param).then((res) => { + if (res.data.code === 200) { + this.codeTableData = res.data.rows || [] + this.codeTotal = res.data.total || 0 + } else { + this.codeTableData = [] + this.codeTotal = 0 + } + this.codeLoading = false + }).catch(() => { + this.codeLoading = false + this.codeTableData = [] + this.codeTotal = 0 + }) + }, + // 编码查询 + handleCodeQuery() { + this.codeQueryParams.pageNum = 1 + this.getCodeList() + }, + +// 重置编码查询 + resetCodeQuery() { + this.resetForm("codeQueryForm") + this.codeQueryParams = { + pageNum: 1, + pageSize: 10, + maCode: undefined + } + this.getCodeList() + }, //编码勾选 codeSelection(selection){ console.log(selection) @@ -456,21 +536,14 @@ export default { }; console.log(obj) this.$modal.confirm('是否确认新购入库勾选的编码?') - .then(function() { - return purchaseWarehouse(obj) - }).then(() => { - // let param={ - // taskId:this.taskId, - // typeId:this.codeRowData.typeId - // } - // getMachineById(param).then((res)=>{ - // this.codeTableData=res.data - // }) - this.openCode=false - this.getList() - this.$modal.msgSuccess('入库成功') + .then(() => { + return purchaseWarehouse(obj) + }).then(() => { + this.openCode = false + this.getList() + this.$modal.msgSuccess('入库成功') }).catch(() => {}); - }else{ + } else { this.$modal.msgError('请先勾选入库编码!') }