From e3f62d00ccd570159f3cb91e321f2acacdf6e610 Mon Sep 17 00:00:00 2001 From: "[li_she]" <[li.she@xujiesoft.com]> Date: Tue, 1 Nov 2022 11:42:13 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B7=A5=E5=85=B7=E6=8E=A5=E6=94=B6=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=E7=BC=96=E7=A0=81=202022=E5=B9=B411=E6=9C=881?= =?UTF-8?q?=E6=97=A5=20sxm?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/knifemold/tool-info.js | 4 ++ src/views/modules/knifemold/receive.vue | 83 ++++++++++++++++++++++--- 2 files changed, 79 insertions(+), 8 deletions(-) diff --git a/src/api/knifemold/tool-info.js b/src/api/knifemold/tool-info.js index 3b2b4c0..ca7c859 100644 --- a/src/api/knifemold/tool-info.js +++ b/src/api/knifemold/tool-info.js @@ -49,5 +49,9 @@ export const updatePoReceiptList = data => createAPI(`toolInfo/updatePoReceiptLi export const updatePoReceiptListR = data => createAPI(`toolInfo/updatePoReceiptListR`, 'POST', data) +// 修改工具接收编码 +export const updateReceiveToolDetail = data => createAPI(`PRHeader/updateReceiveToolDetail`, 'POST', data) + + diff --git a/src/views/modules/knifemold/receive.vue b/src/views/modules/knifemold/receive.vue index 9e6d9ad..ccc5894 100644 --- a/src/views/modules/knifemold/receive.vue +++ b/src/views/modules/knifemold/receive.vue @@ -191,7 +191,7 @@ :label="buttons.cz" align="center"> @@ -270,9 +270,27 @@ - + + + + + + + + + + + + + + + 修改 + 取消 + + @@ -308,6 +326,10 @@ saveFileAssociate, printToolData } from "@/api/knifemold/receive.js" + import { + getToolDetailList, + updateReceiveToolDetail, + } from '@/api/knifemold/tool-info.js' import getLodop from '@/utils/LodopFuncs.js' import axios from "axios"; @@ -321,6 +343,13 @@ }, data() { return { + toolEditFlag: false, + editToolData: { + toolInstanceId: '', + estUseQty: '', + site: '', + newToolInstanceId: '' + }, toolCodeFlag: false, pdfUrl: '', fileList: [], @@ -879,6 +908,14 @@ radio() { this.locationNo = '' }, + editToolData: { + deep: true, + handler: function (newV, oldV) { + if (this.editToolData.newToolInstanceId) { + this.editToolData.newToolInstanceId = this.editToolData.newToolInstanceId.toUpperCase() + } + } + }, locationNo() { this.locationNo = this.locationNo.toUpperCase() }, @@ -892,9 +929,39 @@ } }, methods: { - // 删除工具接收信息 - deleteTool(){ - + // 编辑工具接收信息 + editToolDetail(row) { + this.getToolDetailList(row) + this.toolEditFlag = true + }, + // 获取工具信息 + getToolDetailList(row) { + let queryData = { + site: this.site, + toolInstanceId: row.toolInstanceId, + } + getToolDetailList(queryData).then(({data}) => { + if (data && data.code == 0 && data.rows) { + this.editToolData = { + newToolInstanceId: data.rows[0].toolInstanceId, + site: data.rows[0].site, + toolInstanceId: data.rows[0].toolInstanceId, + estUseQty: data.rows[0].estUseQty, + } + } + }) + }, + // 修改接收信息 + updateToolDetail() { + updateReceiveToolDetail(this.editToolData).then(({data}) => { + if (data.code == 0) { + this.$message.success(data.msg) + this.toolEditFlag = false + this.initPoToolTable() + } else { + this.$message.error(data.msg) + } + }) }, childByValue(childValue) { // childValue就是子组件传过来的值 @@ -962,7 +1029,7 @@ const LODOP = getLodop() if (LODOP) { //LODOP.SET_LICENSES("","7B5624CC84EF99D6B17F27DF4AF4310C","",""); - LODOP.SET_LICENSES("","7B5624CC84EF99D6B17F27DF4AF4310C","",""); + LODOP.SET_LICENSES("", "7B5624CC84EF99D6B17F27DF4AF4310C", "", ""); //循环调用打印机 for (let i = 0; i < printDataList.length; i++) { let printData = printDataList[i] @@ -1181,7 +1248,7 @@ this.toolCodeFlag = true this.toolInstanceId = '' }, - manualInitMailFlag(){ + manualInitMailFlag() { this.generateFlag = true if (this.toolInstanceId == null || this.toolInstanceId == '') { this.$alert('请输入工具实例编码!', '接收数量', { @@ -1244,7 +1311,7 @@ this.manualSaveToolInstanceId() } }, - manualSaveToolInstanceId(){ + manualSaveToolInstanceId() { let status; if (this.radio == "Y") { status = "出库"