BOM展示
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
# 页面标题
|
# 页面标题
|
||||||
VUE_APP_TITLE = 科伦普WMS系统
|
VUE_APP_TITLE = 科伦普综合办公系统
|
||||||
|
|
||||||
# 开发环境配置
|
# 开发环境配置
|
||||||
ENV = 'development'
|
ENV = 'development'
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
# 页面标题
|
# 页面标题
|
||||||
VUE_APP_TITLE = 科伦普WMS系统
|
VUE_APP_TITLE = 科伦普综合办公系统
|
||||||
|
|
||||||
# 生产环境配置
|
# 生产环境配置
|
||||||
ENV = 'production'
|
ENV = 'production'
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
# 页面标题
|
# 页面标题
|
||||||
VUE_APP_TITLE = 科伦普WMS系统
|
VUE_APP_TITLE = 科伦普综合办公系统
|
||||||
|
|
||||||
# 开发环境配置
|
# 开发环境配置
|
||||||
ENV = 'development'
|
ENV = 'development'
|
||||||
|
|||||||
@@ -17,6 +17,7 @@ export default {
|
|||||||
this.$store.dispatch('category/getCategoryList');
|
this.$store.dispatch('category/getCategoryList');
|
||||||
this.$store.dispatch('category/getProductMap');
|
this.$store.dispatch('category/getProductMap');
|
||||||
this.$store.dispatch('category/getRawMaterialMap');
|
this.$store.dispatch('category/getRawMaterialMap');
|
||||||
|
this.$store.dispatch('category/getBomMap');
|
||||||
}
|
}
|
||||||
console.log(this.$store)
|
console.log(this.$store)
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -5,6 +5,11 @@
|
|||||||
{{ item.attrValue }}
|
{{ item.attrValue }}
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
</el-descriptions>
|
</el-descriptions>
|
||||||
|
<div v-else-if="mini">
|
||||||
|
<el-tooltip :content="bomInfo.map(item => item.attrKey + ':' + item.attrValue).join(',')" class="bom-info" placement="top">
|
||||||
|
<span>{{ bomInfo.map(item => item.attrKey).join(',') }}</span>
|
||||||
|
</el-tooltip>
|
||||||
|
</div>
|
||||||
<div v-else>
|
<div v-else>
|
||||||
<el-empty description="暂无BOM信息" />
|
<el-empty description="暂无BOM信息" />
|
||||||
</div>
|
</div>
|
||||||
@@ -12,14 +17,23 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { listBomItem } from '../../../api/wms/bomItem';
|
import { listBomItem } from '@/api/wms/bomItem';
|
||||||
|
import { mapState } from 'vuex';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'BomInfo',
|
name: 'BomInfo',
|
||||||
props: {
|
props: {
|
||||||
bomId: {
|
bomId: {
|
||||||
type: [String, Number],
|
type: [String, Number],
|
||||||
required: true
|
required: false
|
||||||
|
},
|
||||||
|
itemType: {
|
||||||
|
type: String,
|
||||||
|
required: false
|
||||||
|
},
|
||||||
|
itemId: {
|
||||||
|
type: [String, Number],
|
||||||
|
required: false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
@@ -27,15 +41,46 @@ export default {
|
|||||||
bomInfo: []
|
bomInfo: []
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
computed: {
|
||||||
|
...mapState('category', ['bomMap', 'productMap', 'rawMaterialMap']),
|
||||||
|
},
|
||||||
created() {
|
created() {
|
||||||
this.getBomInfo();
|
this.getBomInfo();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
getBomInfo() {
|
getBomInfo() {
|
||||||
listBomItem({ bomId: this.bomId }).then(res => {
|
const bomMap = this.$store.getters.bomMap;
|
||||||
this.bomInfo = res.rows;
|
console.log(bomMap)
|
||||||
})
|
if (!this.bomId && !this.itemType && !this.itemId) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
let bomId = this.bomId;
|
||||||
|
if (!bomId) {
|
||||||
|
if (this.itemType === 'product') {
|
||||||
|
bomId = this.productMap[this.itemId].bomId;
|
||||||
|
} else if (this.itemType === 'raw_material') {
|
||||||
|
bomId = this.rawMaterialMap[this.itemId].bomId;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (bomMap[bomId]) {
|
||||||
|
this.bomInfo = bomMap[bomId];
|
||||||
|
} else {
|
||||||
|
listBomItem({ bomId: bomId }).then(res => {
|
||||||
|
this.bomInfo = res.rows;
|
||||||
|
})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.bom-info {
|
||||||
|
cursor: pointer;
|
||||||
|
/* 溢出隐藏显示省略号 */
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
white-space: nowrap;
|
||||||
|
max-width: 100px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
83
klp-ui/src/components/KLPService/Renderer/BomInfoMini.vue
Normal file
83
klp-ui/src/components/KLPService/Renderer/BomInfoMini.vue
Normal file
@@ -0,0 +1,83 @@
|
|||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<div v-if="bomInfo.length > 0">
|
||||||
|
<el-tooltip :content="bomInfo.map(item => item.attrKey + ':' + item.attrValue).join(',')" class="bom-info" placement="top">
|
||||||
|
<span>{{ bomInfo.map(item => item.attrKey).join(',') }}</span>
|
||||||
|
</el-tooltip>
|
||||||
|
</div>
|
||||||
|
<div v-else>
|
||||||
|
-
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
// 如果传递了bomId直接使用bomId, 如果没有传递,则根据itemType和itemId获取bomId
|
||||||
|
import { listBomItem } from '@/api/wms/bomItem';
|
||||||
|
import { mapState } from 'vuex';
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'BomInfo',
|
||||||
|
props: {
|
||||||
|
bomId: {
|
||||||
|
type: [String, Number],
|
||||||
|
required: false
|
||||||
|
},
|
||||||
|
itemType: {
|
||||||
|
type: String,
|
||||||
|
required: false
|
||||||
|
},
|
||||||
|
itemId: {
|
||||||
|
type: [String, Number],
|
||||||
|
required: false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
bomInfo: []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
...mapState('category', ['bomMap', 'productMap', 'rawMaterialMap']),
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.getBomInfo();
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
getBomInfo() {
|
||||||
|
const bomMap = this.$store.getters.bomMap;
|
||||||
|
console.log(bomMap)
|
||||||
|
if (!this.bomId && !this.itemType && !this.itemId) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
console.log(this.itemType, this.itemId)
|
||||||
|
let bomId = this.bomId;
|
||||||
|
if (!bomId) {
|
||||||
|
if (this.itemType === 'product') {
|
||||||
|
bomId = this.productMap[this.itemId].bomId;
|
||||||
|
} else if (this.itemType === 'raw_material') {
|
||||||
|
bomId = this.rawMaterialMap[this.itemId].bomId;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (bomMap[bomId]) {
|
||||||
|
this.bomInfo = bomMap[bomId];
|
||||||
|
} else {
|
||||||
|
listBomItem({ bomId: bomId }).then(res => {
|
||||||
|
this.bomInfo = res.rows;
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.bom-info {
|
||||||
|
cursor: pointer;
|
||||||
|
/* 溢出隐藏显示省略号 */
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
white-space: nowrap;
|
||||||
|
max-width: 100px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -13,10 +13,10 @@
|
|||||||
append-to-body
|
append-to-body
|
||||||
>
|
>
|
||||||
<el-descriptions :column="1" border>
|
<el-descriptions :column="1" border>
|
||||||
<el-descriptions-item label="ID">
|
<el-descriptions-item label="产品ID">
|
||||||
{{ product.productId || '--' }}
|
{{ product.productId || '--' }}
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
<el-descriptions-item label="名称">
|
<el-descriptions-item label="产品名称">
|
||||||
{{ product.productName || '--' }}
|
{{ product.productName || '--' }}
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
<el-descriptions-item label="产品编码">
|
<el-descriptions-item label="产品编码">
|
||||||
|
|||||||
@@ -9,9 +9,9 @@
|
|||||||
<el-dialog :visible="showDetail" @close="showDetail = false" :title="material.rawMaterialName" width="600px"
|
<el-dialog :visible="showDetail" @close="showDetail = false" :title="material.rawMaterialName" width="600px"
|
||||||
append-to-body>
|
append-to-body>
|
||||||
<el-descriptions :column="1" border>
|
<el-descriptions :column="1" border>
|
||||||
<el-descriptions-item label="ID">{{ material.rawMaterialId }}</el-descriptions-item>
|
<el-descriptions-item label="原材料ID">{{ material.rawMaterialId }}</el-descriptions-item>
|
||||||
<el-descriptions-item label="名称">{{ material.rawMaterialName }}</el-descriptions-item>
|
<el-descriptions-item label="原材料名称">{{ material.rawMaterialName }}</el-descriptions-item>
|
||||||
<el-descriptions-item label="描述">{{ material.rawMaterialCode }}</el-descriptions-item>
|
<el-descriptions-item label="原材料编码">{{ material.rawMaterialCode }}</el-descriptions-item>
|
||||||
</el-descriptions>
|
</el-descriptions>
|
||||||
<BomInfo :bomId="material.bomId" />
|
<BomInfo :bomId="material.bomId" />
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
|||||||
@@ -18,5 +18,6 @@ const getters = {
|
|||||||
sidebarRouters:state => state.permission.sidebarRouters,
|
sidebarRouters:state => state.permission.sidebarRouters,
|
||||||
productList: state => state.category.productList,
|
productList: state => state.category.productList,
|
||||||
rawMaterialList: state => state.category.rawMaterialList,
|
rawMaterialList: state => state.category.rawMaterialList,
|
||||||
|
bomMap: state => state.category.bomMap
|
||||||
}
|
}
|
||||||
export default getters
|
export default getters
|
||||||
|
|||||||
@@ -1,13 +1,15 @@
|
|||||||
import { listCategory } from '@/api/wms/category';
|
import { listCategory } from '@/api/wms/category';
|
||||||
import { listProduct } from '@/api/wms/product';
|
import { listProduct } from '@/api/wms/product';
|
||||||
import { listRawMaterial } from '@/api/wms/rawMaterial';
|
import { listRawMaterial } from '@/api/wms/rawMaterial';
|
||||||
|
import { listBomItem } from '@/api/wms/bomItem';
|
||||||
|
|
||||||
const state = {
|
const state = {
|
||||||
categoryList: [],
|
categoryList: [],
|
||||||
productMap: {},
|
productMap: {},
|
||||||
rawMaterialMap: {},
|
rawMaterialMap: {},
|
||||||
productList: [],
|
productList: [],
|
||||||
rawMaterialList: []
|
rawMaterialList: [],
|
||||||
|
bomMap: {}
|
||||||
};
|
};
|
||||||
|
|
||||||
const mutations = {
|
const mutations = {
|
||||||
@@ -25,6 +27,9 @@ const mutations = {
|
|||||||
},
|
},
|
||||||
SET_RAW_MATERIAL_LIST(state, list) {
|
SET_RAW_MATERIAL_LIST(state, list) {
|
||||||
state.rawMaterialList = list;
|
state.rawMaterialList = list;
|
||||||
|
},
|
||||||
|
SET_BOM_MAP(state, map) {
|
||||||
|
state.bomMap = map;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -33,7 +38,7 @@ const actions = {
|
|||||||
if (state.categoryList.length > 0) {
|
if (state.categoryList.length > 0) {
|
||||||
return Promise.resolve(state.categoryList);
|
return Promise.resolve(state.categoryList);
|
||||||
}
|
}
|
||||||
return listCategory().then(res => {
|
return listCategory({ pageNum: 1, pageSize: 10000 }).then(res => {
|
||||||
commit('SET_CATEGORY_LIST', res.rows || []);
|
commit('SET_CATEGORY_LIST', res.rows || []);
|
||||||
return res.rows || [];
|
return res.rows || [];
|
||||||
});
|
});
|
||||||
@@ -42,7 +47,7 @@ const actions = {
|
|||||||
if (Object.keys(state.productMap).length > 0) {
|
if (Object.keys(state.productMap).length > 0) {
|
||||||
return Promise.resolve(state.productMap);
|
return Promise.resolve(state.productMap);
|
||||||
}
|
}
|
||||||
return listProduct().then(res => {
|
return listProduct({ pageNum: 1, pageSize: 10000 }).then(res => {
|
||||||
const map = {};
|
const map = {};
|
||||||
res.rows.forEach(item => {
|
res.rows.forEach(item => {
|
||||||
map[item.productId] = item;
|
map[item.productId] = item;
|
||||||
@@ -56,7 +61,7 @@ const actions = {
|
|||||||
if (Object.keys(state.rawMaterialMap).length > 0) {
|
if (Object.keys(state.rawMaterialMap).length > 0) {
|
||||||
return Promise.resolve(state.rawMaterialMap);
|
return Promise.resolve(state.rawMaterialMap);
|
||||||
}
|
}
|
||||||
return listRawMaterial().then(res => {
|
return listRawMaterial({ pageNum: 1, pageSize: 10000 }).then(res => {
|
||||||
const map = {};
|
const map = {};
|
||||||
res.rows.forEach(item => {
|
res.rows.forEach(item => {
|
||||||
map[item.rawMaterialId] = item;
|
map[item.rawMaterialId] = item;
|
||||||
@@ -65,6 +70,23 @@ const actions = {
|
|||||||
commit('SET_RAW_MATERIAL_LIST', res.rows || []);
|
commit('SET_RAW_MATERIAL_LIST', res.rows || []);
|
||||||
return map;
|
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 {
|
export default {
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="login">
|
<div class="login">
|
||||||
<el-form ref="loginForm" :model="loginForm" :rules="loginRules" class="login-form">
|
<el-form ref="loginForm" :model="loginForm" :rules="loginRules" class="login-form">
|
||||||
<h3 class="title">科伦普WMS系统</h3>
|
<h3 class="title">科伦普综合办公系统</h3>
|
||||||
<el-form-item prop="username">
|
<el-form-item prop="username">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="loginForm.username"
|
v-model="loginForm.username"
|
||||||
@@ -144,6 +144,7 @@ export default {
|
|||||||
this.$store.dispatch('category/getCategoryList');
|
this.$store.dispatch('category/getCategoryList');
|
||||||
this.$store.dispatch('category/getProductMap');
|
this.$store.dispatch('category/getProductMap');
|
||||||
this.$store.dispatch('category/getRawMaterialMap');
|
this.$store.dispatch('category/getRawMaterialMap');
|
||||||
|
this.$store.dispatch('category/getBomMap');
|
||||||
this.$router.push({ path: this.redirect || "/" }).catch(()=>{});
|
this.$router.push({ path: this.redirect || "/" }).catch(()=>{});
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
|
|||||||
@@ -68,6 +68,11 @@
|
|||||||
</ProductInfo>
|
</ProductInfo>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
<el-table-column label="BOM" align="center">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<BomInfoMini item-type="product" :item-id="scope.row.productId" />
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
<el-table-column label="产品数量" align="center" prop="quantity" />
|
<el-table-column label="产品数量" align="center" prop="quantity" />
|
||||||
<el-table-column label="单位" align="center" prop="unit" />
|
<el-table-column label="单位" align="center" prop="unit" />
|
||||||
<el-table-column label="备注" align="center" prop="remark" />
|
<el-table-column label="备注" align="center" prop="remark" />
|
||||||
@@ -132,6 +137,7 @@ import { getOrder } from "@/api/wms/order";
|
|||||||
import ProductSelect from '@/components/KLPService/ProductSelect';
|
import ProductSelect from '@/components/KLPService/ProductSelect';
|
||||||
import { EOrderStatus } from "@/utils/enums";
|
import { EOrderStatus } from "@/utils/enums";
|
||||||
import { ProductInfo } from '@/components/KLPService';
|
import { ProductInfo } from '@/components/KLPService';
|
||||||
|
import BomInfoMini from '@/components/KLPService/Renderer/BomInfoMini.vue';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "OrderDetailPanel",
|
name: "OrderDetailPanel",
|
||||||
@@ -144,7 +150,8 @@ export default {
|
|||||||
},
|
},
|
||||||
components: {
|
components: {
|
||||||
ProductSelect,
|
ProductSelect,
|
||||||
ProductInfo
|
ProductInfo,
|
||||||
|
BomInfoMini
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
|||||||
@@ -17,8 +17,8 @@
|
|||||||
<el-form-item label="库位" class="form-item">
|
<el-form-item label="库位" class="form-item">
|
||||||
<WarehouseSelect v-model="defaultForm.warehouseId" />
|
<WarehouseSelect v-model="defaultForm.warehouseId" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="主码" class="form-item">
|
<el-form-item label="挂载单据" class="form-item">
|
||||||
<el-select v-model="defaultForm.stockIoId" placeholder="请选择主码" clearable class="form-input">
|
<el-select v-model="defaultForm.stockIoId" placeholder="请选择挂载单据" clearable class="form-input">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in masterList"
|
v-for="item in masterList"
|
||||||
:key="item.stockIoId"
|
:key="item.stockIoId"
|
||||||
@@ -61,9 +61,9 @@
|
|||||||
<WarehouseSelect v-model="scope.row.warehouseId" />
|
<WarehouseSelect v-model="scope.row.warehouseId" />
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="stockIoId" label="主码" align="center">
|
<el-table-column prop="stockIoId" label="挂载单据" align="center">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-select v-model="scope.row.stockIoId" placeholder="请选择主码" clearable class="table-select">
|
<el-select v-model="scope.row.stockIoId" placeholder="请选择挂载单据" clearable class="table-select">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in masterList"
|
v-for="item in masterList"
|
||||||
:key="item.stockIoId"
|
:key="item.stockIoId"
|
||||||
@@ -173,7 +173,7 @@ export default {
|
|||||||
},
|
},
|
||||||
fetchMaster() {
|
fetchMaster() {
|
||||||
listStockIo({ pageSize: 9999, pageNum: 1 }).then(res => {
|
listStockIo({ pageSize: 9999, pageNum: 1 }).then(res => {
|
||||||
console.log(res, '获取主码');
|
console.log(res, '获取挂载单据');
|
||||||
this.masterList = res.rows;
|
this.masterList = res.rows;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -128,6 +128,11 @@
|
|||||||
<dict-tag :options="dict.type.common_swicth" :value="scope.row.isEnabled"/>
|
<dict-tag :options="dict.type.common_swicth" :value="scope.row.isEnabled"/>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
<el-table-column label="BOM" align="center">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<BomInfoMini :bomId="scope.row.bomId" />
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-button
|
<el-button
|
||||||
@@ -260,6 +265,7 @@ import CategorySelect from '@/components/KLPService/CategorySelect';
|
|||||||
import CategoryRenderer from '@/components/KLPService/Renderer/CategoryRenderer.vue';
|
import CategoryRenderer from '@/components/KLPService/Renderer/CategoryRenderer.vue';
|
||||||
import UserSelect from '@/components/KLPService/UserSelect';
|
import UserSelect from '@/components/KLPService/UserSelect';
|
||||||
import BomPanel from '../bom/components/BomPanel.vue';
|
import BomPanel from '../bom/components/BomPanel.vue';
|
||||||
|
import BomInfoMini from '@/components/KLPService/Renderer/BomInfoMini.vue';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "Product",
|
name: "Product",
|
||||||
@@ -267,7 +273,8 @@ export default {
|
|||||||
CategorySelect,
|
CategorySelect,
|
||||||
CategoryRenderer,
|
CategoryRenderer,
|
||||||
UserSelect,
|
UserSelect,
|
||||||
BomPanel
|
BomPanel,
|
||||||
|
BomInfoMini
|
||||||
},
|
},
|
||||||
dicts: ['common_swicth'],
|
dicts: ['common_swicth'],
|
||||||
data() {
|
data() {
|
||||||
|
|||||||
@@ -32,6 +32,11 @@
|
|||||||
<RawMaterialSelect v-model="scope.row.rawMaterialId" placeholder="请选择原材料" />
|
<RawMaterialSelect v-model="scope.row.rawMaterialId" placeholder="请选择原材料" />
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
<el-table-column label="BOM" align="center">
|
||||||
|
<template #default="scope">
|
||||||
|
<BomInfoMini item-type="raw_material" :item-id="scope.row.rawMaterialId" />
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
<el-table-column prop="unit" label="单位" />
|
<el-table-column prop="unit" label="单位" />
|
||||||
<el-table-column prop="onTheWay" label="在途" />
|
<el-table-column prop="onTheWay" label="在途" />
|
||||||
<el-table-column prop="inventory" label="在库" />
|
<el-table-column prop="inventory" label="在库" />
|
||||||
@@ -65,10 +70,11 @@ import { createPurchasePlan } from '@/api/wms/purchasePlan'
|
|||||||
import { listRawMaterial } from '@/api/wms/rawMaterial'
|
import { listRawMaterial } from '@/api/wms/rawMaterial'
|
||||||
import UserSelect from '@/components/KLPService/UserSelect'
|
import UserSelect from '@/components/KLPService/UserSelect'
|
||||||
import RawMaterialSelect from '@/components/KLPService/RawMaterialSelect'
|
import RawMaterialSelect from '@/components/KLPService/RawMaterialSelect'
|
||||||
|
import BomInfoMini from '@/components/KLPService/Renderer/BomInfoMini.vue';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'CreatePurchasePanel',
|
name: 'CreatePurchasePanel',
|
||||||
components: { UserSelect, RawMaterialSelect },
|
components: { UserSelect, RawMaterialSelect, BomInfoMini },
|
||||||
props: {
|
props: {
|
||||||
orderId: {
|
orderId: {
|
||||||
type: [String, Number],
|
type: [String, Number],
|
||||||
|
|||||||
@@ -24,6 +24,13 @@ export default {
|
|||||||
loading: false
|
loading: false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
watch: {
|
||||||
|
orderId: {
|
||||||
|
handler(newVal) {
|
||||||
|
this.handleRecommend()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
if (!this.showButton) {
|
if (!this.showButton) {
|
||||||
this.handleRecommend();
|
this.handleRecommend();
|
||||||
|
|||||||
@@ -15,8 +15,8 @@
|
|||||||
<script>
|
<script>
|
||||||
import RecommendPurchasePanel from './RecommendPurchasePanel.vue'
|
import RecommendPurchasePanel from './RecommendPurchasePanel.vue'
|
||||||
import CreatePurchasePanel from './CreatePurchasePanel.vue'
|
import CreatePurchasePanel from './CreatePurchasePanel.vue'
|
||||||
import { updatePurchasePlan } from '@/api/wms/purchasePlan'
|
import { updateOrder } from '@/api/wms/order'
|
||||||
import { EOrderStatus } from '@/api/wms/order'
|
import { EOrderStatus } from '@/utils/enums'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'PurchasePlanClac',
|
name: 'PurchasePlanClac',
|
||||||
@@ -32,18 +32,22 @@ export default {
|
|||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
recommendData: {}
|
recommendData: {},
|
||||||
|
EOrderStatus: EOrderStatus
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
onRecommend(data) {
|
onRecommend(data) {
|
||||||
|
console.log('获取推荐数据', data)
|
||||||
this.recommendData = data
|
this.recommendData = data
|
||||||
},
|
},
|
||||||
onConfirm(submitData) {
|
onConfirm(submitData) {
|
||||||
updatePurchasePlan({
|
console.log('calc层', submitData)
|
||||||
|
updateOrder({
|
||||||
orderId: this.orderId,
|
orderId: this.orderId,
|
||||||
orderStatus: EOrderStatus.PRODUCTIONING,
|
orderStatus: this.EOrderStatus.PRODUCTIONING,
|
||||||
}).then(response => {
|
}).then(response => {
|
||||||
|
console.log("状态变更成功")
|
||||||
this.$emit('confirm', submitData)
|
this.$emit('confirm', submitData)
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
@@ -65,6 +65,11 @@
|
|||||||
</RawMaterialInfo>
|
</RawMaterialInfo>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
<el-table-column label="BOM" align="center">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<BomInfoMini item-type="raw_material" :item-id="scope.row.rawMaterialId" />
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
<el-table-column label="负责人" align="center" prop="owner" />
|
<el-table-column label="负责人" align="center" prop="owner" />
|
||||||
<el-table-column label="计划采购数量" align="center" prop="quantity" />
|
<el-table-column label="计划采购数量" align="center" prop="quantity" />
|
||||||
<el-table-column label="单位" align="center" prop="unit" />
|
<el-table-column label="单位" align="center" prop="unit" />
|
||||||
@@ -180,6 +185,7 @@ import StockInDialog from "./stockin.vue";
|
|||||||
import RawMaterialSelect from '@/components/KLPService/RawMaterialSelect';
|
import RawMaterialSelect from '@/components/KLPService/RawMaterialSelect';
|
||||||
import UserSelect from '@/components/KLPService/UserSelect'
|
import UserSelect from '@/components/KLPService/UserSelect'
|
||||||
import { RawMaterialInfo } from '@/components/KLPService';
|
import { RawMaterialInfo } from '@/components/KLPService';
|
||||||
|
import BomInfoMini from '@/components/KLPService/Renderer/BomInfoMini.vue';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "PurchasePlanDetail",
|
name: "PurchasePlanDetail",
|
||||||
@@ -187,7 +193,8 @@ export default {
|
|||||||
StockInDialog,
|
StockInDialog,
|
||||||
RawMaterialSelect,
|
RawMaterialSelect,
|
||||||
UserSelect,
|
UserSelect,
|
||||||
RawMaterialInfo
|
RawMaterialInfo,
|
||||||
|
BomInfoMini
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
planId: {
|
planId: {
|
||||||
|
|||||||
@@ -64,6 +64,11 @@
|
|||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
>
|
>
|
||||||
<el-table-column label="原材料" align="center" prop="rawMaterialName" />
|
<el-table-column label="原材料" align="center" prop="rawMaterialName" />
|
||||||
|
<el-table-column label="BOM" align="center">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<BomInfoMini item-type="raw_material" :item-id="scope.row.rawMaterialId" />
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
<el-table-column label="计划数量" align="center" prop="planQuantity" />
|
<el-table-column label="计划数量" align="center" prop="planQuantity" />
|
||||||
<el-table-column label="入库数量" align="center" prop="quantity">
|
<el-table-column label="入库数量" align="center" prop="quantity">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
@@ -121,11 +126,13 @@ import { updatePurchasePlanDetail } from "@/api/wms/purchasePlanDetail";
|
|||||||
import { getRawMaterial } from "@/api/wms/rawMaterial";
|
import { getRawMaterial } from "@/api/wms/rawMaterial";
|
||||||
import { EPurchaseDetailStatus } from "@/utils/enums";
|
import { EPurchaseDetailStatus } from "@/utils/enums";
|
||||||
import WarehouseSelect from "@/components/KLPService/WarehouseSelect";
|
import WarehouseSelect from "@/components/KLPService/WarehouseSelect";
|
||||||
|
import BomInfoMini from '@/components/KLPService/Renderer/BomInfoMini.vue';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "StockInDialog",
|
name: "StockInDialog",
|
||||||
components: {
|
components: {
|
||||||
WarehouseSelect
|
WarehouseSelect,
|
||||||
|
BomInfoMini
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
visible: {
|
visible: {
|
||||||
|
|||||||
@@ -26,6 +26,11 @@
|
|||||||
<RawMaterialInfo :materialId="scope.row.rawMaterialId" />
|
<RawMaterialInfo :materialId="scope.row.rawMaterialId" />
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
<el-table-column label="BOM" align="center">
|
||||||
|
<template #default="scope">
|
||||||
|
<BomInfoMini item-type="raw_material" :item-id="scope.row.rawMaterialId" />
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
<el-table-column prop="unit" label="单位" align="center" />
|
<el-table-column prop="unit" label="单位" align="center" />
|
||||||
<el-table-column prop="onTheWay" label="在途" align="center" />
|
<el-table-column prop="onTheWay" label="在途" align="center" />
|
||||||
<el-table-column prop="inventory" label="在库" align="center" />
|
<el-table-column prop="inventory" label="在库" align="center" />
|
||||||
@@ -65,6 +70,11 @@
|
|||||||
<RawMaterialInfo :materialId="scope.row.rawMaterialId" />
|
<RawMaterialInfo :materialId="scope.row.rawMaterialId" />
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
<el-table-column label="BOM" align="center">
|
||||||
|
<template #default="scope">
|
||||||
|
<BomInfoMini item-type="raw_material" :item-id="scope.row.rawMaterialId" />
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
<el-table-column prop="unit" label="单位" />
|
<el-table-column prop="unit" label="单位" />
|
||||||
<el-table-column prop="onTheWay" label="在途" />
|
<el-table-column prop="onTheWay" label="在途" />
|
||||||
<el-table-column prop="inventory" label="在库" />
|
<el-table-column prop="inventory" label="在库" />
|
||||||
@@ -100,11 +110,11 @@ import { listRawMaterial, listRawMaterialWithDemand } from '@/api/wms/rawMateria
|
|||||||
import UserSelect from '@/components/KLPService/UserSelect'
|
import UserSelect from '@/components/KLPService/UserSelect'
|
||||||
import RawMaterialSelect from '@/components/KLPService/RawMaterialSelect'
|
import RawMaterialSelect from '@/components/KLPService/RawMaterialSelect'
|
||||||
import RawMaterialInfo from '@/components/KLPService/Renderer/RawMaterialInfo.vue'
|
import RawMaterialInfo from '@/components/KLPService/Renderer/RawMaterialInfo.vue'
|
||||||
|
import BomInfoMini from '@/components/KLPService/Renderer/BomInfoMini.vue';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'CreatePurchasePanel',
|
name: 'CreatePurchasePanel',
|
||||||
components: { UserSelect, RawMaterialSelect, RawMaterialInfo },
|
components: { UserSelect, RawMaterialSelect, RawMaterialInfo, BomInfoMini },
|
||||||
props: {
|
props: {
|
||||||
orderId: {
|
orderId: {
|
||||||
type: [String, Number],
|
type: [String, Number],
|
||||||
|
|||||||
@@ -117,7 +117,7 @@
|
|||||||
<el-table-column label="原材料名称" align="center" prop="rawMaterialName" />
|
<el-table-column label="原材料名称" align="center" prop="rawMaterialName" />
|
||||||
<el-table-column label="计量单位" align="center" prop="unit" />
|
<el-table-column label="计量单位" align="center" prop="unit" />
|
||||||
<el-table-column label="钢种/牌号" align="center" prop="steelGrade" />
|
<el-table-column label="钢种/牌号" align="center" prop="steelGrade" />
|
||||||
<el-table-column label="目标冷轧牌号" align="center" prop="targetColdGrade" />
|
<!-- <el-table-column label="目标冷轧牌号" align="center" prop="targetColdGrade" />
|
||||||
<el-table-column label="基础材质分类" align="center">
|
<el-table-column label="基础材质分类" align="center">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<CategoryRenderer :category-id="scope.row.baseMaterialId" />
|
<CategoryRenderer :category-id="scope.row.baseMaterialId" />
|
||||||
@@ -132,6 +132,11 @@
|
|||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<dict-tag :options="dict.type.common_swicth" :value="scope.row.isEnabled"/>
|
<dict-tag :options="dict.type.common_swicth" :value="scope.row.isEnabled"/>
|
||||||
</template>
|
</template>
|
||||||
|
</el-table-column> -->
|
||||||
|
<el-table-column label="BOM" align="center">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<BomInfoMini :bomId="scope.row.bomId" />
|
||||||
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="备注" align="center" prop="remark" />
|
<el-table-column label="备注" align="center" prop="remark" />
|
||||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||||
@@ -292,13 +297,15 @@ import { listRawMaterial, getRawMaterial, delRawMaterial, addRawMaterial, update
|
|||||||
import CategorySelect from "@/components/KLPService/CategorySelect/index.vue";
|
import CategorySelect from "@/components/KLPService/CategorySelect/index.vue";
|
||||||
import CategoryRenderer from '@/components/KLPService/Renderer/CategoryRenderer.vue';
|
import CategoryRenderer from '@/components/KLPService/Renderer/CategoryRenderer.vue';
|
||||||
import BomPanel from '@/views/wms/bom/components/BomPanel.vue';
|
import BomPanel from '@/views/wms/bom/components/BomPanel.vue';
|
||||||
|
import BomInfoMini from '@/components/KLPService/Renderer/BomInfoMini.vue';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "RawMaterial",
|
name: "RawMaterial",
|
||||||
components: {
|
components: {
|
||||||
CategorySelect,
|
CategorySelect,
|
||||||
CategoryRenderer,
|
CategoryRenderer,
|
||||||
BomPanel
|
BomPanel,
|
||||||
|
BomInfoMini
|
||||||
},
|
},
|
||||||
dicts: ['common_swicth'],
|
dicts: ['common_swicth'],
|
||||||
data() {
|
data() {
|
||||||
|
|||||||
@@ -87,6 +87,11 @@
|
|||||||
<span v-else>{{ scope.row.itemId }}</span>
|
<span v-else>{{ scope.row.itemId }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
<el-table-column label="BOM" align="center">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<BomInfoMini :item-type="scope.row.itemType" :item-id="scope.row.itemId" />
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
<el-table-column label="数量" align="center" prop="quantity" />
|
<el-table-column label="数量" align="center" prop="quantity" />
|
||||||
<el-table-column label="单位" align="center" prop="unit" />
|
<el-table-column label="单位" align="center" prop="unit" />
|
||||||
<el-table-column label="批次号" align="center" prop="batchNo" />
|
<el-table-column label="批次号" align="center" prop="batchNo" />
|
||||||
@@ -236,6 +241,7 @@ import RawMaterialSelect from '@/components/KLPService/RawMaterialSelect';
|
|||||||
import ProductSelect from '@/components/KLPService/ProductSelect';
|
import ProductSelect from '@/components/KLPService/ProductSelect';
|
||||||
import { ITEM_TYPE } from '@/utils/enums';
|
import { ITEM_TYPE } from '@/utils/enums';
|
||||||
import {RawMaterialInfo, ProductInfo} from "@/components/KLPService";
|
import {RawMaterialInfo, ProductInfo} from "@/components/KLPService";
|
||||||
|
import BomInfoMini from '@/components/KLPService/Renderer/BomInfoMini.vue';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "StockIoDetailPanel",
|
name: "StockIoDetailPanel",
|
||||||
@@ -244,7 +250,8 @@ export default {
|
|||||||
RawMaterialSelect,
|
RawMaterialSelect,
|
||||||
ProductSelect,
|
ProductSelect,
|
||||||
RawMaterialInfo,
|
RawMaterialInfo,
|
||||||
ProductInfo
|
ProductInfo,
|
||||||
|
BomInfoMini
|
||||||
},
|
},
|
||||||
dicts: ['stock_item_type'],
|
dicts: ['stock_item_type'],
|
||||||
props: {
|
props: {
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ function resolve(dir) {
|
|||||||
|
|
||||||
const CompressionPlugin = require('compression-webpack-plugin')
|
const CompressionPlugin = require('compression-webpack-plugin')
|
||||||
|
|
||||||
const name = process.env.VUE_APP_TITLE || '科伦普WMS系统' // 网页标题
|
const name = process.env.VUE_APP_TITLE || '科伦普综合办公系统' // 网页标题
|
||||||
|
|
||||||
const port = process.env.port || process.env.npm_config_port || 80 // 端口
|
const port = process.env.port || process.env.npm_config_port || 80 // 端口
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user