From 89a9107e9ca32206b7b181fad0275f7656f882fd Mon Sep 17 00:00:00 2001 From: HashMap Date: Wed, 6 Aug 2025 17:12:38 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E5=85=A5=E5=BA=93?= =?UTF-8?q?=E3=80=81=E7=89=A9=E8=B5=84=E7=AE=A1=E7=90=86=E5=92=8C=E5=87=BA?= =?UTF-8?q?=E5=BA=93=E8=AE=B0=E5=BD=95=E7=9B=B8=E5=85=B3=E7=9A=84API?= =?UTF-8?q?=E5=8F=8A=E5=89=8D=E7=AB=AF=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/stock/in.js | 44 ++++ src/api/stock/management.js | 44 ++++ src/api/stock/out.js | 44 ++++ src/views/stock/in/index.vue | 313 +++++++++++++++++++++++++++ src/views/stock/management/index.vue | 257 ++++++++++++++++++++++ src/views/stock/out/index.vue | 306 ++++++++++++++++++++++++++ vite.config.js | 2 +- 7 files changed, 1009 insertions(+), 1 deletion(-) create mode 100644 src/api/stock/in.js create mode 100644 src/api/stock/management.js create mode 100644 src/api/stock/out.js create mode 100644 src/views/stock/in/index.vue create mode 100644 src/views/stock/management/index.vue create mode 100644 src/views/stock/out/index.vue diff --git a/src/api/stock/in.js b/src/api/stock/in.js new file mode 100644 index 0000000..a16d659 --- /dev/null +++ b/src/api/stock/in.js @@ -0,0 +1,44 @@ +import request from '@/utils/request' + +// 查询入库记录列表 +export function listIn(query) { + return request({ + url: '/stock/in/list', + method: 'get', + params: query + }) +} + +// 查询入库记录详细 +export function getIn(stockInCode) { + return request({ + url: '/stock/in/' + stockInCode, + method: 'get' + }) +} + +// 新增入库记录 +export function addIn(data) { + return request({ + url: '/stock/in', + method: 'post', + data: data + }) +} + +// 修改入库记录 +export function updateIn(data) { + return request({ + url: '/stock/in', + method: 'put', + data: data + }) +} + +// 删除入库记录 +export function delIn(stockInCode) { + return request({ + url: '/stock/in/' + stockInCode, + method: 'delete' + }) +} diff --git a/src/api/stock/management.js b/src/api/stock/management.js new file mode 100644 index 0000000..da53806 --- /dev/null +++ b/src/api/stock/management.js @@ -0,0 +1,44 @@ +import request from '@/utils/request' + +// 查询物资管理列表 +export function listManagement(query) { + return request({ + url: '/stock/management/list', + method: 'get', + params: query + }) +} + +// 查询物资管理详细 +export function getManagement(materialManagementCode) { + return request({ + url: '/stock/management/' + materialManagementCode, + method: 'get' + }) +} + +// 新增物资管理 +export function addManagement(data) { + return request({ + url: '/stock/management', + method: 'post', + data: data + }) +} + +// 修改物资管理 +export function updateManagement(data) { + return request({ + url: '/stock/management', + method: 'put', + data: data + }) +} + +// 删除物资管理 +export function delManagement(materialManagementCode) { + return request({ + url: '/stock/management/' + materialManagementCode, + method: 'delete' + }) +} diff --git a/src/api/stock/out.js b/src/api/stock/out.js new file mode 100644 index 0000000..8f78f86 --- /dev/null +++ b/src/api/stock/out.js @@ -0,0 +1,44 @@ +import request from '@/utils/request' + +// 查询出库记录列表 +export function listOut(query) { + return request({ + url: '/stock/out/list', + method: 'get', + params: query + }) +} + +// 查询出库记录详细 +export function getOut(stockOutCode) { + return request({ + url: '/stock/out/' + stockOutCode, + method: 'get' + }) +} + +// 新增出库记录 +export function addOut(data) { + return request({ + url: '/stock/out', + method: 'post', + data: data + }) +} + +// 修改出库记录 +export function updateOut(data) { + return request({ + url: '/stock/out', + method: 'put', + data: data + }) +} + +// 删除出库记录 +export function delOut(stockOutCode) { + return request({ + url: '/stock/out/' + stockOutCode, + method: 'delete' + }) +} diff --git a/src/views/stock/in/index.vue b/src/views/stock/in/index.vue new file mode 100644 index 0000000..d97d695 --- /dev/null +++ b/src/views/stock/in/index.vue @@ -0,0 +1,313 @@ + + + diff --git a/src/views/stock/management/index.vue b/src/views/stock/management/index.vue new file mode 100644 index 0000000..22b5ccf --- /dev/null +++ b/src/views/stock/management/index.vue @@ -0,0 +1,257 @@ + + + diff --git a/src/views/stock/out/index.vue b/src/views/stock/out/index.vue new file mode 100644 index 0000000..679dff8 --- /dev/null +++ b/src/views/stock/out/index.vue @@ -0,0 +1,306 @@ + + + diff --git a/vite.config.js b/vite.config.js index 6bfc4a7..9d3e060 100644 --- a/vite.config.js +++ b/vite.config.js @@ -2,7 +2,7 @@ import path from 'path' import { defineConfig, loadEnv } from 'vite' import createVitePlugins from './vite/plugins' -const baseUrl = 'http://localhost:8080' // 后端接口 +const baseUrl = 'http://192.168.2.51:8080' // 后端接口 // https://vitejs.dev/config/ export default defineConfig(({ mode, command }) => { From 69198e1731cfd1b83abd06714fb0efd7995ba526 Mon Sep 17 00:00:00 2001 From: HashMap Date: Wed, 6 Aug 2025 21:12:31 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E7=89=A9=E8=B5=84?= =?UTF-8?q?=E7=AE=A1=E7=90=86=E5=92=8C=E5=87=BA=E5=BA=93=E8=AE=B0=E5=BD=95?= =?UTF-8?q?=E7=9A=84=E6=96=87=E4=BB=B6=E5=AF=BC=E5=85=A5=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/stock/in/index.vue | 22 +- src/views/stock/management/index.vue | 67 +++- src/views/stock/out/index.vue | 456 ++++++++++++++------------- 3 files changed, 317 insertions(+), 228 deletions(-) diff --git a/src/views/stock/in/index.vue b/src/views/stock/in/index.vue index d97d695..457e850 100644 --- a/src/views/stock/in/index.vue +++ b/src/views/stock/in/index.vue @@ -172,18 +172,18 @@ } /**文件上传中处理 */ -const handleFileUploadProgress = (event, file, fileList) => { - upload.isUploading = true -} + const handleFileUploadProgress = (event, file, fileList) => { + upload.isUploading = true + } -/** 文件上传成功处理 */ -const handleFileSuccess = (response, file, fileList) => { - upload.open = false - upload.isUploading = false - proxy.$refs["uploadRef"].handleRemove(file) - proxy.$alert("
" + response.msg + "
", "导入结果", { dangerouslyUseHTMLString: true }) - getList() -} + /** 文件上传成功处理 */ + const handleFileSuccess = (response, file, fileList) => { + upload.open = false + upload.isUploading = false + proxy.$refs["uploadRef"].handleRemove(file) + proxy.$alert("
" + response.msg + "
", "导入结果", { dangerouslyUseHTMLString: true }) + getList() + } const { queryParams, form, rules } = toRefs(data) diff --git a/src/views/stock/management/index.vue b/src/views/stock/management/index.vue index 22b5ccf..4a59ebb 100644 --- a/src/views/stock/management/index.vue +++ b/src/views/stock/management/index.vue @@ -62,6 +62,9 @@ v-hasPermi="['stock:management:export']" >导出 + + 导入 + @@ -105,12 +108,35 @@ + + + + + +
将文件拖到此处,或点击上传
+ +
+ +