From 2e59f21d0dc1a7a29ce2e7bfe0e86065356c7f49 Mon Sep 17 00:00:00 2001
From: zouyu <2723363702@qq.com>
Date: 星期三, 05 十一月 2025 09:44:24 +0800
Subject: [PATCH] 修复原材料订单提交IFS无法移库的问题
---
src/views/business/materialOrderComponents/materialOrder/filesLookVisible.vue | 31 +++++++------------------------
1 files changed, 7 insertions(+), 24 deletions(-)
diff --git a/src/views/business/materialOrderComponents/materialOrder/filesLookVisible.vue b/src/views/business/materialOrderComponents/materialOrder/filesLookVisible.vue
index db188d7..bfbebb4 100644
--- a/src/views/business/materialOrderComponents/materialOrder/filesLookVisible.vue
+++ b/src/views/business/materialOrderComponents/materialOrder/filesLookVisible.vue
@@ -23,14 +23,12 @@
</template>
<script>
-import ValueTable from "@/components/Table/value-table.vue";
-import file from "@/utils/file";
import limsTable from "@/components/Table/lims-table.vue";
-import { delfile, downFile, getFileList } from "@/api/business/rawMaterialOrder";
+import { delFile, downFile, getFileList } from "@/api/business/rawMaterialOrder";
export default {
name: "filesLookVisible",
// import 寮曞叆鐨勭粍浠堕渶瑕佹敞鍏ュ埌瀵硅薄涓墠鑳戒娇鐢�
- components: { limsTable, ValueTable },
+ components: { limsTable },
props: {
filesDialogVisible: {
type: Boolean,
@@ -154,19 +152,7 @@
// 涓嬭浇
handleDown(row) {
downFile({ id: row.id, }).then(res => {
- if (res.code === 200) {
- let url = '';
- if (res.data.type == 1) {
- url = this.javaApi + '/img/' + res.data.fileUrl
- file.downloadIamge(url, row.fileName)
- } else {
- url = this.javaApi + '/word/' + res.data.fileUrl
- const link = document.createElement('a');
- link.href = url;
- link.download = row.fileName;
- link.click();
- }
- }
+ this.$download.saveAs(res.data.fileUrl, row.fileName);
}).catch(error => {
})
@@ -176,6 +162,8 @@
if (response.code == 200) {
this.$message.success('涓婁紶鎴愬姛');
this.getFileList()
+ } else {
+ this.$message.error(response.msg);
}
},
beforeUpload(file) {
@@ -207,14 +195,9 @@
cancelButtonText: "鍙栨秷",
type: "warning"
}).then(() => {
- delfile({ id: row.id }).then(res => {
- if (res.code === 500) {
- return
- }
+ delFile({ id: row.id }).then(res => {
this.$message.success('鍒犻櫎鎴愬姛')
- this.getList()
- }).catch(e => {
- this.$message.error('鍒犻櫎澶辫触')
+ this.getFileList()
})
}).catch(() => { })
}
--
Gitblit v1.9.3