From cac91a6a4c74d90215ebd93f787564efd651ae98 Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期四, 28 五月 2026 13:12:24 +0800
Subject: [PATCH] 富边电子 1.客户往来,销售合同号改为订单号。增加订单号查询搜索。 2.发货台账,没有时间显示, 3.指标统计改名为销售统计 4.采购台账,采购合同号改为采购单号。取消销售合同号。签订日期改为采购日期。付款方式取消显示。 5.供应商档案,取消供应商类型(甲乙丙丁),录入时也取消。 6.采购合同号改成采购单号。 7.采购报表,退款储量改成采购总价(或不显示)。 8.销售之后库存没有出库记录。 9.质量管理,检验员改成送件员。
---
src/views/procurementManagement/procurementInvoiceLedger/Modal/UploadModal.vue | 38 ++++++++++++++++++++++++++++----------
1 files changed, 28 insertions(+), 10 deletions(-)
diff --git a/src/views/procurementManagement/procurementInvoiceLedger/Modal/UploadModal.vue b/src/views/procurementManagement/procurementInvoiceLedger/Modal/UploadModal.vue
index ba06618..b82bd10 100644
--- a/src/views/procurementManagement/procurementInvoiceLedger/Modal/UploadModal.vue
+++ b/src/views/procurementManagement/procurementInvoiceLedger/Modal/UploadModal.vue
@@ -2,12 +2,15 @@
<el-dialog v-model="upload.open" :title="upload.title" :width="500">
<FileUpload
ref="fileUploadRef"
- accept=".xlsx, .xls"
+ accept=".xlsx, .xls, .pdf"
:headers="upload.headers"
- :action="upload.url + '?updateSupport=' + upload.updateSupport"
+ :autoUpload="true"
+ :action="upload.url"
:disabled="upload.isUploading"
:showTip="false"
+ :limit="10"
@success="handleFileSuccess"
+ @remove="removeFile"
/>
<template #footer>
<div class="dialog-footer">
@@ -23,11 +26,17 @@
import { getToken } from "@/utils/auth.js";
import { FileUpload } from "@/components/Upload";
import { ElMessage } from "element-plus";
+import { ref } from "vue";
+import useFormData from "@/hooks/useFormData";
defineOptions({
name: "鏉ョエ鍙拌处闄勪欢琛ュ厖",
});
+const { form, resetForm } = useFormData({
+ id: undefined,
+ tempFileIds: [],
+});
const emits = defineEmits(["uploadSuccess"]);
const fileUploadRef = ref();
const upload = reactive({
@@ -40,29 +49,38 @@
// 璁剧疆涓婁紶鐨勮姹傚ご閮�
headers: { Authorization: "Bearer " + getToken() },
// 涓婁紶鐨勫湴鍧�
- url: import.meta.env.VITE_APP_BASE_API + "/system/supplier/import",
+ url: import.meta.env.VITE_APP_BASE_API + "/file/upload",
});
// 鐐瑰嚮瀵煎叆
-const handleImport = () => {
+const handleImport = (id) => {
+ form.id = id;
upload.open = true;
upload.title = "鏉ョエ鍙拌处闄勪欢琛ュ厖";
};
const submitFileForm = () => {
- fileUploadRef.value.uploadApi();
+ emits("uploadSuccess", form);
+ resetForm();
+ upload.open = false;
+ // 娓呯┖鏂囦欢鍒楄〃
+ fileUploadRef.value.fileList = [];
};
const handleFileSuccess = (response) => {
- const { code, msg } = response;
- if (code == 200) {
+ if (response.code == 200) {
+ form.tempFileIds.push(response.data.tempId);
+ console.log('form',form);
ElMessage({ message: "瀵煎叆鎴愬姛", type: "success" });
- upload.open = false;
- emits("uploadSuccess");
} else {
- ElMessage({ message: msg, type: "error" });
+ ElMessage({ message: response.msg, type: "error" });
}
};
+const removeFile = (file) => {
+ const { tempId } = file.response.data;
+ form.tempFileIds = form.tempFileIds.filter((item) => item !== tempId);
+};
+
defineExpose({
handleImport,
});
--
Gitblit v1.9.3