From fb0cc776191090193cb61b7ccc0ddd40adfa4d6c Mon Sep 17 00:00:00 2001 From: yunuo970428 <405378304@qq.com> Date: Tue, 15 Apr 2025 16:49:41 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E5=96=84=E5=BA=93=E5=AD=98=E6=9F=A5?= =?UTF-8?q?=E8=AF=A2=E3=80=81=E5=87=BA=E5=85=A5=E5=BA=93=E6=9F=A5=E8=AF=A2?= =?UTF-8?q?=E3=80=81=E9=85=8D=E4=BB=B6=E5=BA=93=E5=AD=98=E6=9F=A5=E8=AF=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- yxt-as-ui/src/api/Common/dictcommons.js | 11 +- .../api/storage/oldPartsInAndOutStorage.js | 41 ------- .../src/api/storage/oldPartsInvertory.js | 107 +++++++----------- .../src/views/storage/inventory/inventory.vue | 2 +- .../storage/inventory/inventoryRefer.vue | 2 +- .../storage/oldPartsInAndOutStorage/index.vue | 7 +- .../views/storage/oldPartsInvertory/index.vue | 7 +- .../sparePartsInventory.vue | 2 +- 8 files changed, 61 insertions(+), 118 deletions(-) diff --git a/yxt-as-ui/src/api/Common/dictcommons.js b/yxt-as-ui/src/api/Common/dictcommons.js index 4a5c66a39e..993a51f4dd 100644 --- a/yxt-as-ui/src/api/Common/dictcommons.js +++ b/yxt-as-ui/src/api/Common/dictcommons.js @@ -365,7 +365,7 @@ export function getGoodsCategory(params) { }) } -// 查询分公司orgSidPath下的所有仓库 +// 查询分公司orgSidPath下的所有仓库(可传参数仓库类型) export function getAllWarehouse(params) { return request({ url: '/wms/apiadmin/base/wmswarehouseinfo/listAll', @@ -403,3 +403,12 @@ export function getAllRackByKQSid(data) { params: data }) } + +// 根据仓库sid查询库区 +export function getWarehouseareas(data) { + return request({ + url: '/wms/apiadmin/base/wmswarehousearea/selectAll', + method: 'get', + params: data + }) +} diff --git a/yxt-as-ui/src/api/storage/oldPartsInAndOutStorage.js b/yxt-as-ui/src/api/storage/oldPartsInAndOutStorage.js index db61db7ab6..8d38e6c403 100644 --- a/yxt-as-ui/src/api/storage/oldPartsInAndOutStorage.js +++ b/yxt-as-ui/src/api/storage/oldPartsInAndOutStorage.js @@ -23,46 +23,5 @@ export default { 'Content-Type': 'application/json' } }) - }, - // 选择厂家 - choiceManufacturer: function(params) { - return request({ - url: '/yxtbase/apiadmin/base/basemanufacturer/listAll', - method: 'post', - data: params, - headers: { - 'Content-Type': 'application/json' - } - }) - }, - // 查询所有仓库 - getWarehouses: function(params) { - return request({ - url: '/wms/apiadmin/base/wmswarehouseinfo/listAll', - method: 'post', - data: params, - headers: { - 'Content-Type': 'application/json' - } - }) - }, - // 根据仓库查询库区 - getWarehouseareas: function(data) { - return request({ - url: '/wms/apiadmin/base/wmswarehousearea/selectAll', - method: 'get', - params: data, - headers: { - 'Content-Type': 'application/json' - } - }) - }, - // 根据库区查询库位 - getAllRackByKQSid: function(data) { - return request({ - url: '/wms/apiadmin/base/wmswarehouserack/getAllRackByKQSid', - method: 'get', - params: data - }) } } diff --git a/yxt-as-ui/src/api/storage/oldPartsInvertory.js b/yxt-as-ui/src/api/storage/oldPartsInvertory.js index 406b2c6b72..d422268adb 100644 --- a/yxt-as-ui/src/api/storage/oldPartsInvertory.js +++ b/yxt-as-ui/src/api/storage/oldPartsInvertory.js @@ -1,71 +1,44 @@ import request from '@/utils/request' export default { - // 查询分页列表 - listPage: function(params) { - return request({ - url: '/wms/apiadmin/WmsOldInventory/oldPageList', - method: 'post', - data: params, - headers: { - 'Content-Type': 'application/json' - } - }) - }, - // 获取旧件出入库记录详情 - init: function(data) { - return request({ - url: '/wms/apiadmin/WmsOldInventory/getDetailsList?sid=' + data, - method: 'get' - }) - }, - deleteBySids: function(data) { - return request({ - url: '/wms/apiadmin/WmsOldInventory/delBySids', - method: 'DELETE', - data: data, - headers: { - 'Content-Type': 'application/json' - } - }) - }, - // 导出报表 - exportExcel: function(data) { - return request({ - url: '/wms/apiadmin/WmsOldInventory/excelList', - method: 'post', - responseType: 'blob', // 表明返回服务器返回的数据类型 - data: data, - headers: { - 'Content-Type': 'application/json' - } - }) - }, - // 查询所有仓库 - getWarehouses: function(params) { - return request({ - url: '/wms/apiadmin/base/wmswarehouseinfo/listAll', - method: 'post', - data: params, - headers: { - 'Content-Type': 'application/json' - } - }) - }, - // 根据仓库查询库区 - getWarehouseareas: function(data) { - return request({ - url: '/wms/apiadmin/base/wmswarehousearea/selectAll', - method: 'get', - params: data - }) - }, - // 根据库区查询库位 - getAllRackByKQSid: function(data) { - return request({ - url: '/wms/apiadmin/base/wmswarehouserack/getAllRackByKQSid', - method: 'get', - params: data - }) - } + // 查询分页列表 + listPage: function(params) { + return request({ + url: '/wms/apiadmin/WmsOldInventory/oldPageList', + method: 'post', + data: params, + headers: { + 'Content-Type': 'application/json' + } + }) + }, + // 获取旧件出入库记录详情 + init: function(data) { + return request({ + url: '/wms/apiadmin/WmsOldInventory/getDetailsList?sid=' + data, + method: 'get' + }) + }, + deleteBySids: function(data) { + return request({ + url: '/wms/apiadmin/WmsOldInventory/delBySids', + method: 'DELETE', + data: data, + headers: { + 'Content-Type': 'application/json' + } + }) + }, + // 导出报表 + exportExcel: function(data) { + return request({ + url: '/wms/apiadmin/WmsOldInventory/excelList', + method: 'post', + responseType: 'blob', // 表明返回服务器返回的数据类型 + data: data, + headers: { + 'Content-Type': 'application/json' + } + }) + } } diff --git a/yxt-as-ui/src/views/storage/inventory/inventory.vue b/yxt-as-ui/src/views/storage/inventory/inventory.vue index 13b3391091..6ac680be13 100644 --- a/yxt-as-ui/src/views/storage/inventory/inventory.vue +++ b/yxt-as-ui/src/views/storage/inventory/inventory.vue @@ -206,7 +206,7 @@ export default { }, methods: { init() { - getAllWarehouse({ orgPath: window.sessionStorage.getItem('defaultOrgPath') }).then((res) => { + getAllWarehouse({ orgPath: window.sessionStorage.getItem('defaultOrgPath'), warehouseTypeValue: '配件库' }).then((res) => { if (res.success) { this.warehouseList = res.data } diff --git a/yxt-as-ui/src/views/storage/inventory/inventoryRefer.vue b/yxt-as-ui/src/views/storage/inventory/inventoryRefer.vue index e53d95d9ed..d6ff2ed595 100644 --- a/yxt-as-ui/src/views/storage/inventory/inventoryRefer.vue +++ b/yxt-as-ui/src/views/storage/inventory/inventoryRefer.vue @@ -228,7 +228,7 @@ export default { this.busType_list = res.data } }) - getAllWarehouse({ orgPath: window.sessionStorage.getItem('defaultOrgPath') }).then((res) => { + getAllWarehouse({ orgPath: window.sessionStorage.getItem('defaultOrgPath'), warehouseTypeValue: '配件库' }).then((res) => { if (res.success) { this.warehouseList = res.data } diff --git a/yxt-as-ui/src/views/storage/oldPartsInAndOutStorage/index.vue b/yxt-as-ui/src/views/storage/oldPartsInAndOutStorage/index.vue index 11b31f9856..3f6a48ba19 100644 --- a/yxt-as-ui/src/views/storage/oldPartsInAndOutStorage/index.vue +++ b/yxt-as-ui/src/views/storage/oldPartsInAndOutStorage/index.vue @@ -121,6 +121,7 @@ import req from '@/api/storage/oldPartsInAndOutStorage.js' import ButtonBar from '@/components/ButtonBar' import Pagination from '@/components/pagination' import { typeValues } from '@/api/Common/dictcommons' +import { getAllRackByKQSid, getAllWarehouse, getWarehouseareas } from '@/api/Common/dictcommons' import req2 from '@/api/goods/factory.js' export default { @@ -204,7 +205,7 @@ export default { }, methods: { init() { - req.getWarehouses({ orgPath: window.sessionStorage.getItem('defaultOrgPath'), warehouseTypeValue: '旧件库' }).then((res) => { + getAllWarehouse({ orgPath: window.sessionStorage.getItem('defaultOrgPath'), warehouseTypeValue: '旧件库' }).then((res) => { if (res.success) { this.warehouseList = res.data } @@ -354,7 +355,7 @@ export default { } }, getWarehouseAreaList(sid) { - req.getWarehouseareas({ ckSid: sid }).then((res) => { + getWarehouseareas({ ckSid: sid }).then((res) => { if (res.success) { this.warehouseAreaList = res.data } @@ -372,7 +373,7 @@ export default { } }, getWareHouseCodeList(sid) { - req.getAllRackByKQSid({ kqSid: sid }).then((res) => { + getAllRackByKQSid({ kqSid: sid }).then((res) => { if (res.success) { this.warehouseRackCodeList = res.data } diff --git a/yxt-as-ui/src/views/storage/oldPartsInvertory/index.vue b/yxt-as-ui/src/views/storage/oldPartsInvertory/index.vue index c3dc4eb099..5e1563ee87 100644 --- a/yxt-as-ui/src/views/storage/oldPartsInvertory/index.vue +++ b/yxt-as-ui/src/views/storage/oldPartsInvertory/index.vue @@ -97,6 +97,7 @@ import ButtonBar from '@/components/ButtonBar' import Pagination from '@/components/pagination' import req from '@/api/storage/oldPartsInvertory.js' import divInfo from './oldPartsInvertoryInfo.vue' +import { getAllRackByKQSid, getAllWarehouse, getWarehouseareas } from '@/api/Common/dictcommons' export default { components: { @@ -330,7 +331,7 @@ export default { this.viewState = 1 }, getWarehouseList() { - req.getWarehouses({ orgPath: window.sessionStorage.getItem('defaultOrgPath'), warehouseTypeValue: '旧件库' }).then((res) => { + getAllWarehouse({ orgPath: window.sessionStorage.getItem('defaultOrgPath'), warehouseTypeValue: '旧件库' }).then((res) => { if (res.success) { this.warehouseList = res.data } @@ -350,7 +351,7 @@ export default { } }, getWarehouseAreaList(sid) { - req.getWarehouseareas({ ckSid: sid }).then((res) => { + getWarehouseareas({ ckSid: sid }).then((res) => { if (res.success) { this.warehouseAreaList = res.data } @@ -368,7 +369,7 @@ export default { } }, getWareHouseCodeList(sid) { - req.getAllRackByKQSid({ kqSid: sid }).then((res) => { + getAllRackByKQSid({ kqSid: sid }).then((res) => { if (res.success) { this.warehouseRackCodeList = res.data } diff --git a/yxt-as-ui/src/views/storage/sparePartsInventory/sparePartsInventory.vue b/yxt-as-ui/src/views/storage/sparePartsInventory/sparePartsInventory.vue index 4e5945373a..c65f15ff52 100644 --- a/yxt-as-ui/src/views/storage/sparePartsInventory/sparePartsInventory.vue +++ b/yxt-as-ui/src/views/storage/sparePartsInventory/sparePartsInventory.vue @@ -165,7 +165,7 @@ export default { }, methods: { init() { - getAllWarehouse({ orgPath: window.sessionStorage.getItem('defaultOrgPath') }).then((res) => { + getAllWarehouse({ orgPath: window.sessionStorage.getItem('defaultOrgPath'), warehouseTypeValue: '配件库' }).then((res) => { if (res.success) { this.warehouseList = res.data }