diff --git a/klp-ui/.env.development b/klp-ui/.env.development index 6b821ed6..10929804 100644 --- a/klp-ui/.env.development +++ b/klp-ui/.env.development @@ -1,5 +1,5 @@ # 页面标题 -VUE_APP_TITLE = 科伦普WMS系统 +VUE_APP_TITLE = 科伦普综合办公系统 # 开发环境配置 ENV = 'development' diff --git a/klp-ui/.env.production b/klp-ui/.env.production index 1ed3f472..63dcd55d 100644 --- a/klp-ui/.env.production +++ b/klp-ui/.env.production @@ -1,5 +1,5 @@ # 页面标题 -VUE_APP_TITLE = 科伦普WMS系统 +VUE_APP_TITLE = 科伦普综合办公系统 # 生产环境配置 ENV = 'production' diff --git a/klp-ui/.env.stage b/klp-ui/.env.stage index 3b78fa35..429d23cd 100644 --- a/klp-ui/.env.stage +++ b/klp-ui/.env.stage @@ -1,5 +1,5 @@ # 页面标题 -VUE_APP_TITLE = 科伦普WMS系统 +VUE_APP_TITLE = 科伦普综合办公系统 # 开发环境配置 ENV = 'development' diff --git a/klp-ui/src/App.vue b/klp-ui/src/App.vue index f616137d..3192caa9 100644 --- a/klp-ui/src/App.vue +++ b/klp-ui/src/App.vue @@ -17,6 +17,7 @@ export default { this.$store.dispatch('category/getCategoryList'); this.$store.dispatch('category/getProductMap'); this.$store.dispatch('category/getRawMaterialMap'); + this.$store.dispatch('category/getBomMap'); } console.log(this.$store) }, diff --git a/klp-ui/src/components/KLPService/Renderer/BomInfo.vue b/klp-ui/src/components/KLPService/Renderer/BomInfo.vue index 9a88341e..7f831990 100644 --- a/klp-ui/src/components/KLPService/Renderer/BomInfo.vue +++ b/klp-ui/src/components/KLPService/Renderer/BomInfo.vue @@ -5,6 +5,11 @@ {{ item.attrValue }} +
+ + {{ bomInfo.map(item => item.attrKey).join(',') }} + +
@@ -12,14 +17,23 @@ \ No newline at end of file + + + \ No newline at end of file diff --git a/klp-ui/src/components/KLPService/Renderer/BomInfoMini.vue b/klp-ui/src/components/KLPService/Renderer/BomInfoMini.vue new file mode 100644 index 00000000..da2098be --- /dev/null +++ b/klp-ui/src/components/KLPService/Renderer/BomInfoMini.vue @@ -0,0 +1,83 @@ + + + + + \ No newline at end of file diff --git a/klp-ui/src/components/KLPService/Renderer/ProductInfo.vue b/klp-ui/src/components/KLPService/Renderer/ProductInfo.vue index f4c256cd..1df2898f 100644 --- a/klp-ui/src/components/KLPService/Renderer/ProductInfo.vue +++ b/klp-ui/src/components/KLPService/Renderer/ProductInfo.vue @@ -13,10 +13,10 @@ append-to-body > - + {{ product.productId || '--' }} - + {{ product.productName || '--' }} diff --git a/klp-ui/src/components/KLPService/Renderer/RawMaterialInfo.vue b/klp-ui/src/components/KLPService/Renderer/RawMaterialInfo.vue index 2fe77a07..8f161e96 100644 --- a/klp-ui/src/components/KLPService/Renderer/RawMaterialInfo.vue +++ b/klp-ui/src/components/KLPService/Renderer/RawMaterialInfo.vue @@ -9,9 +9,9 @@ - {{ material.rawMaterialId }} - {{ material.rawMaterialName }} - {{ material.rawMaterialCode }} + {{ material.rawMaterialId }} + {{ material.rawMaterialName }} + {{ material.rawMaterialCode }} diff --git a/klp-ui/src/store/getters.js b/klp-ui/src/store/getters.js index 4f51de72..ca50b716 100644 --- a/klp-ui/src/store/getters.js +++ b/klp-ui/src/store/getters.js @@ -18,5 +18,6 @@ const getters = { sidebarRouters:state => state.permission.sidebarRouters, productList: state => state.category.productList, rawMaterialList: state => state.category.rawMaterialList, + bomMap: state => state.category.bomMap } export default getters diff --git a/klp-ui/src/store/modules/category.js b/klp-ui/src/store/modules/category.js index 6ccbb2d8..923e118d 100644 --- a/klp-ui/src/store/modules/category.js +++ b/klp-ui/src/store/modules/category.js @@ -1,13 +1,15 @@ import { listCategory } from '@/api/wms/category'; import { listProduct } from '@/api/wms/product'; import { listRawMaterial } from '@/api/wms/rawMaterial'; +import { listBomItem } from '@/api/wms/bomItem'; const state = { categoryList: [], productMap: {}, rawMaterialMap: {}, productList: [], - rawMaterialList: [] + rawMaterialList: [], + bomMap: {} }; const mutations = { @@ -25,6 +27,9 @@ const mutations = { }, SET_RAW_MATERIAL_LIST(state, list) { state.rawMaterialList = list; + }, + SET_BOM_MAP(state, map) { + state.bomMap = map; } }; @@ -33,7 +38,7 @@ const actions = { if (state.categoryList.length > 0) { return Promise.resolve(state.categoryList); } - return listCategory().then(res => { + return listCategory({ pageNum: 1, pageSize: 10000 }).then(res => { commit('SET_CATEGORY_LIST', res.rows || []); return res.rows || []; }); @@ -42,7 +47,7 @@ const actions = { if (Object.keys(state.productMap).length > 0) { return Promise.resolve(state.productMap); } - return listProduct().then(res => { + return listProduct({ pageNum: 1, pageSize: 10000 }).then(res => { const map = {}; res.rows.forEach(item => { map[item.productId] = item; @@ -56,7 +61,7 @@ const actions = { if (Object.keys(state.rawMaterialMap).length > 0) { return Promise.resolve(state.rawMaterialMap); } - return listRawMaterial().then(res => { + return listRawMaterial({ pageNum: 1, pageSize: 10000 }).then(res => { const map = {}; res.rows.forEach(item => { map[item.rawMaterialId] = item; @@ -65,6 +70,23 @@ const actions = { commit('SET_RAW_MATERIAL_LIST', res.rows || []); return map; }); + }, + getBomMap({ state, commit }) { + if (Object.keys(state.bomMap).length > 0) { + return Promise.resolve(state.bomMap); + } + return listBomItem({ pageNum: 1, pageSize: 10000 }).then(res => { + console.log('bomItem', res) + const map = {}; + res.rows.forEach(item => { + if (!map[item.bomId]) { + map[item.bomId] = []; + } + map[item.bomId].push(item); + }); + commit('SET_BOM_MAP', map); + return map; + }) } }; export default { diff --git a/klp-ui/src/views/login.vue b/klp-ui/src/views/login.vue index 5ad4904f..ff76f4c5 100644 --- a/klp-ui/src/views/login.vue +++ b/klp-ui/src/views/login.vue @@ -1,7 +1,7 @@ + + + @@ -132,6 +137,7 @@ import { getOrder } from "@/api/wms/order"; import ProductSelect from '@/components/KLPService/ProductSelect'; import { EOrderStatus } from "@/utils/enums"; import { ProductInfo } from '@/components/KLPService'; +import BomInfoMini from '@/components/KLPService/Renderer/BomInfoMini.vue'; export default { name: "OrderDetailPanel", @@ -144,7 +150,8 @@ export default { }, components: { ProductSelect, - ProductInfo + ProductInfo, + BomInfoMini }, data() { return { diff --git a/klp-ui/src/views/wms/print/scaner.vue b/klp-ui/src/views/wms/print/scaner.vue index c9969df0..066a8a08 100644 --- a/klp-ui/src/views/wms/print/scaner.vue +++ b/klp-ui/src/views/wms/print/scaner.vue @@ -17,8 +17,8 @@ - - + + - + + + + + + + @@ -65,10 +70,11 @@ import { createPurchasePlan } from '@/api/wms/purchasePlan' import { listRawMaterial } from '@/api/wms/rawMaterial' import UserSelect from '@/components/KLPService/UserSelect' import RawMaterialSelect from '@/components/KLPService/RawMaterialSelect' +import BomInfoMini from '@/components/KLPService/Renderer/BomInfoMini.vue'; export default { name: 'CreatePurchasePanel', - components: { UserSelect, RawMaterialSelect }, + components: { UserSelect, RawMaterialSelect, BomInfoMini }, props: { orderId: { type: [String, Number], diff --git a/klp-ui/src/views/wms/purchasePlan/panels/RecommendPurchasePanel.vue b/klp-ui/src/views/wms/purchasePlan/panels/RecommendPurchasePanel.vue index aa364459..cd3183b7 100644 --- a/klp-ui/src/views/wms/purchasePlan/panels/RecommendPurchasePanel.vue +++ b/klp-ui/src/views/wms/purchasePlan/panels/RecommendPurchasePanel.vue @@ -24,6 +24,13 @@ export default { loading: false } }, + watch: { + orderId: { + handler(newVal) { + this.handleRecommend() + } + } + }, mounted() { if (!this.showButton) { this.handleRecommend(); diff --git a/klp-ui/src/views/wms/purchasePlan/panels/clac.vue b/klp-ui/src/views/wms/purchasePlan/panels/clac.vue index 8776ee6d..a9a64155 100644 --- a/klp-ui/src/views/wms/purchasePlan/panels/clac.vue +++ b/klp-ui/src/views/wms/purchasePlan/panels/clac.vue @@ -15,8 +15,8 @@