From 73354af9bc2db6c1c137930a130dd526398b7ab3 Mon Sep 17 00:00:00 2001 From: jjLv <1981429112@qq.com> Date: Fri, 15 Nov 2024 09:22:11 +0800 Subject: [PATCH 01/12] =?UTF-8?q?=E9=A2=86=E6=96=99=E5=87=BA=E5=BA=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/material/lease/outBound/index.vue | 40 +++++++++++++++------ 1 file changed, 29 insertions(+), 11 deletions(-) diff --git a/src/views/material/lease/outBound/index.vue b/src/views/material/lease/outBound/index.vue index 4d690bf3..ae558ab5 100644 --- a/src/views/material/lease/outBound/index.vue +++ b/src/views/material/lease/outBound/index.vue @@ -118,7 +118,7 @@ label="申请数量" align="center" prop="preCountNum" - width="110px" + width="80px" :show-overflow-tooltip="true" > @@ -127,7 +127,7 @@ label="已出库数量" align="center" prop="alNum" - width="110px" + width="80px" :show-overflow-tooltip="true" > @@ -175,7 +175,7 @@ :show-overflow-tooltip="true" /> - + @@ -644,11 +644,12 @@ From 576f6d11b9ad7673228543f6cc016b9441c26e8a Mon Sep 17 00:00:00 2001 From: jjLv <1981429112@qq.com> Date: Fri, 15 Nov 2024 15:22:57 +0800 Subject: [PATCH 05/12] =?UTF-8?q?=E7=BB=91=E5=AE=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/material/purchase/goodsBind/component/bindTools.vue | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/views/material/purchase/goodsBind/component/bindTools.vue b/src/views/material/purchase/goodsBind/component/bindTools.vue index 66a709a9..6fd1b3c9 100644 --- a/src/views/material/purchase/goodsBind/component/bindTools.vue +++ b/src/views/material/purchase/goodsBind/component/bindTools.vue @@ -528,7 +528,9 @@ export default { dtoList: this.codeTableList, typeId: this.queryBindForm.typeId, }); - + if (res.code == 200) { + this.$modal.msgSuccess("绑定成功"); + } console.log(res, "编码结果--"); }, // 移除 From 64fa253bcfa21d3cf1b262851b241fe796775e3f Mon Sep 17 00:00:00 2001 From: jjLv <1981429112@qq.com> Date: Fri, 15 Nov 2024 16:02:29 +0800 Subject: [PATCH 06/12] =?UTF-8?q?=E7=BB=91=E5=AE=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/purchase/goodsBind.js | 10 + .../goodsBind/component/bindTools.vue | 277 +++++++++++++++++- 2 files changed, 273 insertions(+), 14 deletions(-) diff --git a/src/api/purchase/goodsBind.js b/src/api/purchase/goodsBind.js index c87f6429..c72fe8ad 100644 --- a/src/api/purchase/goodsBind.js +++ b/src/api/purchase/goodsBind.js @@ -22,6 +22,15 @@ export function getNewBuyBindListDetailsApi(query) { }) } +//二级页面 查看 +export function getMaCodeInfo(query) { + return request({ + url: '/material/purchase_macode_info/list', + method: 'get', + params: query, + }) +} + //任务 详情 export function bindAllData(data) { return request({ @@ -40,6 +49,7 @@ export function getListDetailById(query) { }) } + // 导出 export function exportNewBuy(data) { return request({ diff --git a/src/views/material/purchase/goodsBind/component/bindTools.vue b/src/views/material/purchase/goodsBind/component/bindTools.vue index 6fd1b3c9..547ee655 100644 --- a/src/views/material/purchase/goodsBind/component/bindTools.vue +++ b/src/views/material/purchase/goodsBind/component/bindTools.vue @@ -97,12 +97,12 @@ show-overflow-tooltip /> - + /> --> - - + + @@ -181,9 +184,9 @@ > - - - + + + @@ -247,8 +250,8 @@ - - + + @@ -294,7 +384,13 @@ import { bindAllData, getListDetailById, getNewBuyBindListDetailsApi, + getMaCodeInfo, } from "@/api/purchase/goodsBind"; +import { getToken } from "@/utils/auth"; +import { + uploadPurchaseFile, + getPurchaseFileList, +} from "@/api/purchase/goodsAccept"; export default { name: "BindTools", @@ -376,6 +472,26 @@ export default { productDate: "", taskStatus: 3, }, + // 是否显示弹出层 + open: false, + rowData: {}, + fileDataList: [ + { dictLabel: "合格证", fileType: "0", name: "", url: "" }, + { dictLabel: "型式试验报告", fileType: "1", name: "", url: "" }, + { dictLabel: "出厂检测报告", fileType: "2", name: "", url: "" }, + { dictLabel: "第三方监测报告", fileType: "3", name: "", url: "" }, + { dictLabel: "其他报告", fileType: "4", name: "", url: "" }, + ], + //图片查看弹窗 + dialogImageUrl: "", + dialogVisible: false, + //上传 + upload: { + // 设置上传的请求头部 + headers: { Authorization: "Bearer " + getToken() }, + // 上传的地址 + url: process.env.VUE_APP_BASE_API + "/file/upload", + }, }; }, created() { @@ -421,6 +537,13 @@ export default { // 查看 handleView(row) { this.viewCodeVisible = true; + getMaCodeInfo({ taskId: row.taskId, typeId: row.typeId }).then( + (response) => { + this.viewCodeList = response.rows; + this.titleBind = "查看"; + this.loadingTwo = false; + } + ); // this.loadingTwo = true // getListDetailById({ taskId: row.taskId, typeId: row.typeId }).then( // (response) => { @@ -434,7 +557,7 @@ export default { // 绑定 handleBind(row) { this.bindCodeVisible = true; - this.waitBindNum = row.purchaseNum; + this.waitBindNum = row.checkNum - row.bindNum; this.queryBindForm.typeId = row.typeId; this.queryBindForm.typeName = row.typeName; this.queryBindForm.maTypeName = row.maTypeName; @@ -459,6 +582,130 @@ export default { .then(() => {}) .catch(() => {}); }, + + //文件管理 + openFileDialog(row) { + this.rowData = row; + this.fileDataList = [ + { dictLabel: "合格证", fileType: "0", name: "", url: "" }, + { dictLabel: "型式试验报告", fileType: "1", name: "", url: "" }, + { dictLabel: "出厂检测报告", fileType: "2", name: "", url: "" }, + { dictLabel: "第三方监测报告", fileType: "3", name: "", url: "" }, + { dictLabel: "其他报告", fileType: "4", name: "", url: "" }, + ]; + if (this.taskId == "") { + // console.log(this.rowData) + // console.log(this.rowData.bmFileInfos) + if (this.rowData.bmFileInfos.length > 0) { + this.rowData.bmFileInfos.forEach((item) => { + let index = this.fileDataList.findIndex( + (v) => v.fileType == item.fileType + ); + this.fileDataList[index].name = item.name; + this.fileDataList[index].url = item.url; + }); + } + } else { + this.getFileData(); + } + this.open = true; + }, + getFileData() { + let param = { + modelId: this.rowData.typeId, + taskType: 0, + taskId: this.rowData.taskId, + }; + getPurchaseFileList(param) + .then((response) => { + if (response.rows.length > 0) { + response.rows.forEach((item) => { + let index = this.fileDataList.findIndex( + (v) => v.fileType == item.fileType + ); + this.fileDataList[index].name = item.name; + this.fileDataList[index].url = item.url; + }); + } + }) + .catch(() => {}); + }, + beforeFileUpload(row) { + this.rowData.fileType = row.fileType; + }, + // 文件上传成功处理 + handleFileSuccess(response, file, fileList) { + if (response.code == 200) { + if (this.taskId == "") { + //新增逻辑 + // console.log(response) + // console.log(this.rowData) + // console.log(this.rowData.bmFileInfos) + let obj = { + taskId: this.taskId, + taskType: "0", + name: response.data.name, + url: response.data.url, + modelId: this.rowData.typeId, + fileType: this.rowData.fileType, + // "dictLabel": this.rowData.dictLabel, + }; + //根据文件上传返回更新文件管理弹窗内容 + let index = this.fileDataList.findIndex( + (v) => v.fileType == this.rowData.fileType + ); + this.fileDataList[index].name = response.data.name; + this.fileDataList[index].url = response.data.url; + //判断当前上传的文件是否已上传过-再往机具类型数据中插入 + if (this.rowData.bmFileInfos.length > 0) { + let index2 = this.rowData.bmFileInfos.findIndex( + (v) => v.fileType == this.rowData.fileType + ); + if (index2 > -1) { + //相同类型文件重复上传-替换 + this.rowData.bmFileInfos.splice(index2, 0, obj); + } else { + //不存在相同类型文件-添加 + this.rowData.bmFileInfos.push(obj); + } + } else { + this.rowData.bmFileInfos.push(obj); + } + } else { + //编辑逻辑 + let param = { + taskId: this.taskId, + taskType: "0", + name: response.data.name, + url: response.data.url, + modelId: this.rowData.typeId, + fileType: this.rowData.fileType, + // "dictLabel": this.rowData.dictLabel, + }; + uploadPurchaseFile(param) + .then((response) => { + this.$modal.msgSuccess("上传成功"); + this.getFileData(); + }) + .catch(() => { + this.$modal.msgError("上传失败"); + }); + } + } + }, + //图片查看 + picturePreview(file) { + this.dialogImageUrl = file.url; + const parts = file.name.split("."); + const extension = parts.pop(); + if (extension === "doc" || extension === "docx" || extension === "pdf") { + const windowName = file.name; + window.open(file.url, windowName); + } else { + this.dialogVisible = true; + } + }, + // 下载 onDownloadQr() { console.log("二维码下载"); @@ -531,6 +778,8 @@ export default { if (res.code == 200) { this.$modal.msgSuccess("绑定成功"); } + this.getCodeList(); + this.bindCodeVisible = false; console.log(res, "编码结果--"); }, // 移除 From 31c8917d86134ec2ae388efea22594da4e4de57a Mon Sep 17 00:00:00 2001 From: jjLv <1981429112@qq.com> Date: Fri, 15 Nov 2024 16:43:33 +0800 Subject: [PATCH 07/12] =?UTF-8?q?=E7=BB=91=E5=AE=9Abug=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../purchase/goodsBind/component/bindTools.vue | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/views/material/purchase/goodsBind/component/bindTools.vue b/src/views/material/purchase/goodsBind/component/bindTools.vue index 547ee655..88b53ee7 100644 --- a/src/views/material/purchase/goodsBind/component/bindTools.vue +++ b/src/views/material/purchase/goodsBind/component/bindTools.vue @@ -190,7 +190,11 @@ - + @@ -262,7 +266,7 @@ @@ -472,6 +476,7 @@ export default { productDate: "", taskStatus: 3, }, + taskId: "", // 是否显示弹出层 open: false, rowData: {}, @@ -499,6 +504,7 @@ export default { this.handleCodeBinding = this.debounce(this.handleCodeBinding, 1000); }, mounted() { + this.taskId = this.queryTaskId; this.getCodeList(); }, methods: { @@ -780,6 +786,8 @@ export default { } this.getCodeList(); this.bindCodeVisible = false; + this.resetForm("queryFormBindRef"); + this.codeTableList = []; console.log(res, "编码结果--"); }, // 移除 From f6bad9b43ddab7956428e8b556f8fb661089c344 Mon Sep 17 00:00:00 2001 From: jjLv <1981429112@qq.com> Date: Fri, 15 Nov 2024 17:03:07 +0800 Subject: [PATCH 08/12] =?UTF-8?q?=E8=81=94=E8=B0=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../material/purchase/goodsArrived/component/home.vue | 4 ++-- .../purchase/goodsBind/component/bindTools.vue | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/views/material/purchase/goodsArrived/component/home.vue b/src/views/material/purchase/goodsArrived/component/home.vue index 994bdef4..724f7982 100644 --- a/src/views/material/purchase/goodsArrived/component/home.vue +++ b/src/views/material/purchase/goodsArrived/component/home.vue @@ -787,8 +787,8 @@ export default { message: "操作成功", type: "success", }); - this.noticeOpen = false; - this.getTaskInfo(); + this.showPeople = false; + this.getList(); } }); } else { diff --git a/src/views/material/purchase/goodsBind/component/bindTools.vue b/src/views/material/purchase/goodsBind/component/bindTools.vue index 88b53ee7..ae9fb5e4 100644 --- a/src/views/material/purchase/goodsBind/component/bindTools.vue +++ b/src/views/material/purchase/goodsBind/component/bindTools.vue @@ -190,11 +190,11 @@ - + /> --> @@ -270,7 +270,7 @@ /> - + + + +
+
验收结论
+ + +
+
+ 确认 + 取消 +
+
+ + - \ No newline at end of file +} + \ No newline at end of file From f32baffd4ecec6d5b8d2b3f549691007d1edfcf9 Mon Sep 17 00:00:00 2001 From: jjLv <1981429112@qq.com> Date: Fri, 15 Nov 2024 17:41:14 +0800 Subject: [PATCH 10/12] =?UTF-8?q?=E9=AA=8C=E6=94=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/material/purchase/goodsAccept/detail.vue | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/views/material/purchase/goodsAccept/detail.vue b/src/views/material/purchase/goodsAccept/detail.vue index eb89dab6..b9b1c1c9 100644 --- a/src/views/material/purchase/goodsAccept/detail.vue +++ b/src/views/material/purchase/goodsAccept/detail.vue @@ -493,6 +493,7 @@ export default { typeId: row.typeId, status: this.taskStatus, checkResult: this.checkResult, + managerType: row.managerType, }; this.checkList = []; this.checkList.push(obj); @@ -507,6 +508,7 @@ export default { typeId: row.typeId, status: this.taskStatus, checkResult: this.checkResult, + managerType: row.managerType, }; this.checkList = []; this.checkList.push(obj); @@ -540,7 +542,7 @@ export default { typeId: item.typeId, status: this.taskStatus, checkResult: this.checkResult, - managerType: item.checkList, + managerType: item.managerType, }; return obj; }); From 00460397fbcc4031700e263188c04e2f7cffd9b9 Mon Sep 17 00:00:00 2001 From: jjLv <1981429112@qq.com> Date: Fri, 15 Nov 2024 17:45:08 +0800 Subject: [PATCH 11/12] =?UTF-8?q?=E9=AA=8C=E6=94=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/material/purchase/goodsAccept/detail.vue | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/views/material/purchase/goodsAccept/detail.vue b/src/views/material/purchase/goodsAccept/detail.vue index b9b1c1c9..9b12db9c 100644 --- a/src/views/material/purchase/goodsAccept/detail.vue +++ b/src/views/material/purchase/goodsAccept/detail.vue @@ -493,7 +493,7 @@ export default { typeId: row.typeId, status: this.taskStatus, checkResult: this.checkResult, - managerType: row.managerType, + managerType: row.manageType, }; this.checkList = []; this.checkList.push(obj); @@ -508,7 +508,7 @@ export default { typeId: row.typeId, status: this.taskStatus, checkResult: this.checkResult, - managerType: row.managerType, + managerType: row.manageType, }; this.checkList = []; this.checkList.push(obj); @@ -525,7 +525,7 @@ export default { typeId: item.typeId, status: this.taskStatus, checkResult: this.checkResult, - managerType: item.managerType, + managerType: item.manageType, }; return obj; }); @@ -542,7 +542,7 @@ export default { typeId: item.typeId, status: this.taskStatus, checkResult: this.checkResult, - managerType: item.managerType, + managerType: item.manageType, }; return obj; }); From f9425a11888771b1cc04c9d290ae2fbbf5cdc7b0 Mon Sep 17 00:00:00 2001 From: jjLv <1981429112@qq.com> Date: Fri, 15 Nov 2024 17:50:37 +0800 Subject: [PATCH 12/12] =?UTF-8?q?=E9=AA=8C=E6=94=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/material/purchase/goodsAccept/detail.vue | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/views/material/purchase/goodsAccept/detail.vue b/src/views/material/purchase/goodsAccept/detail.vue index 9b12db9c..f3fa9636 100644 --- a/src/views/material/purchase/goodsAccept/detail.vue +++ b/src/views/material/purchase/goodsAccept/detail.vue @@ -493,7 +493,7 @@ export default { typeId: row.typeId, status: this.taskStatus, checkResult: this.checkResult, - managerType: row.manageType, + manageType: row.manageType, }; this.checkList = []; this.checkList.push(obj); @@ -508,7 +508,7 @@ export default { typeId: row.typeId, status: this.taskStatus, checkResult: this.checkResult, - managerType: row.manageType, + manageType: row.manageType, }; this.checkList = []; this.checkList.push(obj); @@ -525,7 +525,7 @@ export default { typeId: item.typeId, status: this.taskStatus, checkResult: this.checkResult, - managerType: item.manageType, + manageType: item.manageType, }; return obj; }); @@ -542,7 +542,7 @@ export default { typeId: item.typeId, status: this.taskStatus, checkResult: this.checkResult, - managerType: item.manageType, + manageType: item.manageType, }; return obj; });