diff --git a/gear-ui3/src/api/oa/bom.js b/gear-ui3/src/api/oa/bom.js new file mode 100644 index 0000000..f179312 --- /dev/null +++ b/gear-ui3/src/api/oa/bom.js @@ -0,0 +1,44 @@ +import request from '@/utils/request' + +// 查询BOM 头,关联产品或原材料列表 +export function listBom(query) { + return request({ + url: '/klp/bom/list', + method: 'get', + params: query + }) +} + +// 查询BOM 头,关联产品或原材料详细 +export function getBom(bomId) { + return request({ + url: '/klp/bom/' + bomId, + method: 'get' + }) +} + +// 新增BOM 头,关联产品或原材料 +export function addBom(data) { + return request({ + url: '/klp/bom', + method: 'post', + data: data + }) +} + +// 修改BOM 头,关联产品或原材料 +export function updateBom(data) { + return request({ + url: '/klp/bom', + method: 'put', + data: data + }) +} + +// 删除BOM 头,关联产品或原材料 +export function delBom(bomId) { + return request({ + url: '/klp/bom/' + bomId, + method: 'delete' + }) +} diff --git a/gear-ui3/src/api/oa/bomItem.js b/gear-ui3/src/api/oa/bomItem.js new file mode 100644 index 0000000..f5a5c5a --- /dev/null +++ b/gear-ui3/src/api/oa/bomItem.js @@ -0,0 +1,44 @@ +import request from '@/utils/request' + +// 查询BOM 明细,存放属性–值列表 +export function listBomItem(query) { + return request({ + url: '/wms/bomItem/list', + method: 'get', + params: query + }) +} + +// 查询BOM 明细,存放属性–值详细 +export function getBomItem(itemId) { + return request({ + url: '/wms/bomItem/' + itemId, + method: 'get' + }) +} + +// 新增BOM 明细,存放属性–值 +export function addBomItem(data) { + return request({ + url: '/wms/bomItem', + method: 'post', + data: data + }) +} + +// 修改BOM 明细,存放属性–值 +export function updateBomItem(data) { + return request({ + url: '/wms/bomItem', + method: 'put', + data: data + }) +} + +// 删除BOM 明细,存放属性–值 +export function delBomItem(itemId) { + return request({ + url: '/wms/bomItem/' + itemId, + method: 'delete' + }) +} diff --git a/gear-ui3/src/api/oa/product.js b/gear-ui3/src/api/oa/product.js new file mode 100644 index 0000000..da91a7c --- /dev/null +++ b/gear-ui3/src/api/oa/product.js @@ -0,0 +1,44 @@ +import request from '@/utils/request' + +// 查询产品列表 +export function listProduct(query) { + return request({ + url: '/wms/product/list', + method: 'get', + params: query + }) +} + +// 查询产品详细 +export function getProduct(productId) { + return request({ + url: '/wms/product/' + productId, + method: 'get' + }) +} + +// 新增产品 +export function addProduct(data) { + return request({ + url: '/wms/product', + method: 'post', + data: data + }) +} + +// 修改产品 +export function updateProduct(data) { + return request({ + url: '/wms/product', + method: 'put', + data: data + }) +} + +// 删除产品 +export function delProduct(productId) { + return request({ + url: '/wms/product/' + productId, + method: 'delete' + }) +} diff --git a/gear-ui3/src/api/oa/productCategory.js b/gear-ui3/src/api/oa/productCategory.js new file mode 100644 index 0000000..6664a9e --- /dev/null +++ b/gear-ui3/src/api/oa/productCategory.js @@ -0,0 +1,44 @@ +import request from '@/utils/request' + +// 查询产品分类树列表 +export function listProductCategory(query) { + return request({ + url: '/oa/productCategory/list', + method: 'get', + params: query + }) +} + +// 查询产品分类树详细 +export function getProductCategory(categoryId) { + return request({ + url: '/oa/productCategory/' + categoryId, + method: 'get' + }) +} + +// 新增产品分类树 +export function addProductCategory(data) { + return request({ + url: '/oa/productCategory', + method: 'post', + data: data + }) +} + +// 修改产品分类树 +export function updateProductCategory(data) { + return request({ + url: '/oa/productCategory', + method: 'put', + data: data + }) +} + +// 删除产品分类树 +export function delProductCategory(categoryId) { + return request({ + url: '/oa/productCategory/' + categoryId, + method: 'delete' + }) +} diff --git a/gear-ui3/src/components/Renderer/BomInfo.vue b/gear-ui3/src/components/Renderer/BomInfo.vue new file mode 100644 index 0000000..619535d --- /dev/null +++ b/gear-ui3/src/components/Renderer/BomInfo.vue @@ -0,0 +1,83 @@ + + + + + diff --git a/gear-ui3/src/components/Renderer/BomInfoMini.vue b/gear-ui3/src/components/Renderer/BomInfoMini.vue new file mode 100644 index 0000000..e5ce824 --- /dev/null +++ b/gear-ui3/src/components/Renderer/BomInfoMini.vue @@ -0,0 +1,84 @@ + + + + + diff --git a/gear-ui3/src/components/Renderer/ProductInfo.vue b/gear-ui3/src/components/Renderer/ProductInfo.vue new file mode 100644 index 0000000..5f679b1 --- /dev/null +++ b/gear-ui3/src/components/Renderer/ProductInfo.vue @@ -0,0 +1,88 @@ + + + + + \ No newline at end of file diff --git a/gear-ui3/src/store/modules/product.js b/gear-ui3/src/store/modules/product.js new file mode 100644 index 0000000..e24c80d --- /dev/null +++ b/gear-ui3/src/store/modules/product.js @@ -0,0 +1,41 @@ +import { listProduct } from '@/api/oa/product'; +import { listBomItem } from '@/api/oa/bomItem'; + +const useProductStore = defineStore('product', { + state: () => ({ + productMap: {}, + bomMap: {}, + }), + + actions: { + setProductMap(productMap) { + this.productMap = productMap; + }, + setBomMap(bomMap) { + this.bomMap = bomMap; + }, + async getBomInfo(bomId) { + try { + if (!this.bomMap[bomId]) { + const res = await listBomItem({ bomId }); + this.bomMap[bomId] = res.rows; + } + return this.bomMap[bomId]; + } catch (error) { + console.error(error); + return []; + } + }, + fetchProductMap() { + listProduct().then(res => { + const map = {}; + res.data.forEach(item => { + map[item.productId] = item; + }); + this.productMap = map; + }) + }, + } +}) + +export default useProductStore; \ No newline at end of file diff --git a/gear-ui3/src/views/info/construction/detail.vue b/gear-ui3/src/views/info/construction/detail.vue index 7cf8cc8..c245243 100644 --- a/gear-ui3/src/views/info/construction/detail.vue +++ b/gear-ui3/src/views/info/construction/detail.vue @@ -88,7 +88,7 @@ @click="handleExport" >导出 - + diff --git a/gear-ui3/src/views/info/construction/index.vue b/gear-ui3/src/views/info/construction/index.vue index 2c34b5e..85a69ba 100644 --- a/gear-ui3/src/views/info/construction/index.vue +++ b/gear-ui3/src/views/info/construction/index.vue @@ -70,7 +70,7 @@ @click="handleExport" >导出 - + diff --git a/gear-ui3/src/views/info/express/index.vue b/gear-ui3/src/views/info/express/index.vue index a02cf84..6d07fd3 100644 --- a/gear-ui3/src/views/info/express/index.vue +++ b/gear-ui3/src/views/info/express/index.vue @@ -110,7 +110,7 @@ >导出 - + diff --git a/gear-ui3/src/views/info/express/question.vue b/gear-ui3/src/views/info/express/question.vue index b6950eb..bfcede0 100644 --- a/gear-ui3/src/views/info/express/question.vue +++ b/gear-ui3/src/views/info/express/question.vue @@ -78,7 +78,7 @@ @click="handleExport" >导出 - + diff --git a/gear-ui3/src/views/info/report/index.vue b/gear-ui3/src/views/info/report/index.vue index 8919b7f..bb6a9c7 100644 --- a/gear-ui3/src/views/info/report/index.vue +++ b/gear-ui3/src/views/info/report/index.vue @@ -82,7 +82,7 @@ >导出 - + diff --git a/gear-ui3/src/views/product/category/index.vue b/gear-ui3/src/views/product/category/index.vue new file mode 100644 index 0000000..f6876f5 --- /dev/null +++ b/gear-ui3/src/views/product/category/index.vue @@ -0,0 +1,265 @@ + + + diff --git a/gear-ui3/src/views/product/components/BomItem.vue b/gear-ui3/src/views/product/components/BomItem.vue new file mode 100644 index 0000000..82c18a4 --- /dev/null +++ b/gear-ui3/src/views/product/components/BomItem.vue @@ -0,0 +1,254 @@ + + + diff --git a/gear-ui3/src/views/product/components/BomPanel.vue b/gear-ui3/src/views/product/components/BomPanel.vue new file mode 100644 index 0000000..de1606a --- /dev/null +++ b/gear-ui3/src/views/product/components/BomPanel.vue @@ -0,0 +1,230 @@ + + + + + \ No newline at end of file diff --git a/gear-ui3/src/views/product/info/index.vue b/gear-ui3/src/views/product/info/index.vue new file mode 100644 index 0000000..7caeb15 --- /dev/null +++ b/gear-ui3/src/views/product/info/index.vue @@ -0,0 +1,314 @@ + + + diff --git a/node_modules/.pnpm/@esbuild+win32-x64@0.25.8/node_modules/@esbuild/win32-x64/esbuild.exe b/node_modules/.pnpm/@esbuild+win32-x64@0.25.8/node_modules/@esbuild/win32-x64/esbuild.exe deleted file mode 100644 index 4d12fc7..0000000 Binary files a/node_modules/.pnpm/@esbuild+win32-x64@0.25.8/node_modules/@esbuild/win32-x64/esbuild.exe and /dev/null differ diff --git a/node_modules/.pnpm/@rollup+rollup-win32-x64-msvc@4.46.2/node_modules/@rollup/rollup-win32-x64-msvc/rollup.win32-x64-msvc.node b/node_modules/.pnpm/@rollup+rollup-win32-x64-msvc@4.46.2/node_modules/@rollup/rollup-win32-x64-msvc/rollup.win32-x64-msvc.node deleted file mode 100644 index 02aedb9..0000000 Binary files a/node_modules/.pnpm/@rollup+rollup-win32-x64-msvc@4.46.2/node_modules/@rollup/rollup-win32-x64-msvc/rollup.win32-x64-msvc.node and /dev/null differ diff --git a/node_modules/.pnpm/@tailwindcss+oxide-win32-x64-msvc@4.1.11/node_modules/@tailwindcss/oxide-win32-x64-msvc/tailwindcss-oxide.win32-x64-msvc.node b/node_modules/.pnpm/@tailwindcss+oxide-win32-x64-msvc@4.1.11/node_modules/@tailwindcss/oxide-win32-x64-msvc/tailwindcss-oxide.win32-x64-msvc.node deleted file mode 100644 index 76b9de0..0000000 Binary files a/node_modules/.pnpm/@tailwindcss+oxide-win32-x64-msvc@4.1.11/node_modules/@tailwindcss/oxide-win32-x64-msvc/tailwindcss-oxide.win32-x64-msvc.node and /dev/null differ diff --git a/node_modules/.pnpm/lightningcss-win32-x64-msvc@1.30.1/node_modules/lightningcss-win32-x64-msvc/lightningcss.win32-x64-msvc.node b/node_modules/.pnpm/lightningcss-win32-x64-msvc@1.30.1/node_modules/lightningcss-win32-x64-msvc/lightningcss.win32-x64-msvc.node deleted file mode 100644 index ff1f1e3..0000000 Binary files a/node_modules/.pnpm/lightningcss-win32-x64-msvc@1.30.1/node_modules/lightningcss-win32-x64-msvc/lightningcss.win32-x64-msvc.node and /dev/null differ