From e82a191e374321d8a30ffadef7078daf0112b4e0 Mon Sep 17 00:00:00 2001 From: zjf <1799650030@qq.com> Date: Tue, 19 Aug 2025 12:44:37 +0800 Subject: [PATCH] =?UTF-8?q?1.other.ts=E5=A2=9E=E5=8A=A0application/octet-s?= =?UTF-8?q?tream=E7=99=BD=E5=90=8D=E5=8D=95=EF=BC=8C=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?=E5=8F=A3=E5=91=B3=E6=A8=A1=E5=9D=97=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/supermarketerp/smErpTasteStock.ts | 41 +++++++ src/utils/other.ts | 3 +- .../supermarketerp/smErpTasteStock/form.vue | 111 +++++++++++++++++ .../supermarketerp/smErpTasteStock/index.vue | 115 ++++++++++++++++++ 4 files changed, 269 insertions(+), 1 deletion(-) create mode 100644 src/api/supermarketerp/smErpTasteStock.ts create mode 100644 src/views/supermarketerp/smErpTasteStock/form.vue create mode 100644 src/views/supermarketerp/smErpTasteStock/index.vue diff --git a/src/api/supermarketerp/smErpTasteStock.ts b/src/api/supermarketerp/smErpTasteStock.ts new file mode 100644 index 0000000..bc697f4 --- /dev/null +++ b/src/api/supermarketerp/smErpTasteStock.ts @@ -0,0 +1,41 @@ +import request from "/@/utils/request" + +export function fetchList(query?: Object) { + return request({ + url: '/supermarket/smErpTasteStock/page', + method: 'get', + params: query + }) +} + +export function addObj(obj?: Object) { + return request({ + url: '/supermarket/smErpTasteStock', + method: 'post', + data: obj + }) +} + +export function getObj(id?: string) { + return request({ + url: '/supermarket/smErpTasteStock/' + id, + method: 'get' + }) +} + +export function delObjs(ids?: Object) { + return request({ + url: '/supermarket/smErpTasteStock', + method: 'delete', + data: ids + }) +} + +export function putObj(obj?: Object) { + return request({ + url: '/supermarket/smErpTasteStock', + method: 'put', + data: obj + }) +} + diff --git a/src/utils/other.ts b/src/utils/other.ts index ca381da..6d95f83 100644 --- a/src/utils/other.ts +++ b/src/utils/other.ts @@ -352,8 +352,9 @@ export function handleBlobFile(response: any, fileName: string) { "text/plain", "image/jpeg", "image/png", + // "application/zip" // 添加 ZIP 文件类型支持 + "application/octet-stream" ] - if (!allowedTypes.includes(blob.type) && blob.type !== "") { useMessage().error("不支持的文件类型") return diff --git a/src/views/supermarketerp/smErpTasteStock/form.vue b/src/views/supermarketerp/smErpTasteStock/form.vue new file mode 100644 index 0000000..1e39acf --- /dev/null +++ b/src/views/supermarketerp/smErpTasteStock/form.vue @@ -0,0 +1,111 @@ + + + diff --git a/src/views/supermarketerp/smErpTasteStock/index.vue b/src/views/supermarketerp/smErpTasteStock/index.vue new file mode 100644 index 0000000..a09fd06 --- /dev/null +++ b/src/views/supermarketerp/smErpTasteStock/index.vue @@ -0,0 +1,115 @@ + + +