diff --git a/klp-ui/src/components/KLPService/ProductSelect/index.vue b/klp-ui/src/components/KLPService/ProductSelect/index.vue
index bc9cd1e5..490cd422 100644
--- a/klp-ui/src/components/KLPService/ProductSelect/index.vue
+++ b/klp-ui/src/components/KLPService/ProductSelect/index.vue
@@ -147,39 +147,32 @@ export default {
},
getLabel(item) {
// 产品名称[规格](参数),如果有则写,没有则省略
- if (!item.specification) {
- return `${item.productName}(${this.getSku(item)})`
+ const sku = this.getSku(item);
+ let str = item.productName;
+ if (item.specification) {
+ str += `[${item.specification}]`
}
- return `${item.productName}[${item.specification}](${this.getSku(item)})`
+
+ if (sku) {
+ str += `(${sku})`
+ }
+ return str;
},
getSku(item) {
- const boms = item.bomItems || [];
- console.log(boms, '产品参数');
- if (!boms.length) {
- return '暂无参数信息';
- }
- // 查找attrKey为'规格'的attrvalue
- const specification = boms.find(p => p.attrKey === '规格');
-
- // 查找attrKey为'表面处理'的attrvalue
- const factory = boms.find(p => p.attrKey === '表面处理');
-
- // 查找attrKey为'材质'的attrvalue
- const material = boms.find(p => p.attrKey === '材质');
-
-
- // 组合sku:
+ // 查询item的材质(material),表面处理(surfaceTreatmentDesc),厂家(manufacturer),锌层(zincLayer),如果有则添加到sku字符串中
let sku = '';
- if (specification) {
- sku += '规格:' + specification.attrValue + ';';
+ if (item.material) {
+ sku += '材质:' + item.material + ';';
}
- if (factory) {
- sku += '表面处理:' + factory.attrValue + ';';
+ if (item.surfaceTreatmentDesc) {
+ sku += '表面处理:' + item.surfaceTreatmentDesc + ';';
}
- if (material) {
- sku += '材质:' + material.attrValue + ';';
+ if (item.manufacturer) {
+ sku += '厂家:' + item.manufacturer + ';';
+ }
+ if (item.zincLayer) {
+ sku += '锌层:' + item.zincLayer + ';';
}
- console.log(sku, item, boms, '产品参数');
return sku;
},
onChange(val) {
diff --git a/klp-ui/src/components/KLPService/RawMaterialSelect/index.vue b/klp-ui/src/components/KLPService/RawMaterialSelect/index.vue
index ff16ada7..d08e288b 100644
--- a/klp-ui/src/components/KLPService/RawMaterialSelect/index.vue
+++ b/klp-ui/src/components/KLPService/RawMaterialSelect/index.vue
@@ -151,38 +151,34 @@ export default {
},
getLabel(item) {
// 原材料名称[规格](参数),如果有则写,没有则省略
- if (!item.specification) {
- return `${item.rawMaterialName}(${this.getSku(item)})`
+
+ // 如果有sku拼接(sku), 有规格则拼接[规格], 否则只拼接原材料名称
+ const sku = this.getSku(item);
+ let str = item.rawMaterialName;
+ if (item.specification) {
+ str += `[${item.specification}]`
}
- return `${item.rawMaterialName}[${item.specification}](${this.getSku(item)})`
+
+ if (sku) {
+ str += `(${sku})`
+ }
+ return str;
},
getSku(item) {
- const boms = item.bomItems;
- if (!boms || boms.length === 0) {
- return '暂无参数信息';
- }
- // 查找attrKey为'规格'的attrvalue
- const specification = boms.find(p => p.attrKey === '规格');
-
- // 查找attrKey为'厂家'的attrvalue
- const factory = boms.find(p => p.attrKey === '厂家');
-
- // 查找attrKey为'材质'的attrvalue
- const material = boms.find(p => p.attrKey === '材质');
-
- console.log(boms, item, '查找bomItems');
- // 组合sku:
+ // 查询item的材质(material),表面处理(surfaceTreatmentDesc),厂家(manufacturer),锌层(zincLayer),如果有则添加到sku字符串中
let sku = '';
- if (specification) {
- sku += '规格:' + specification.attrValue + ';';
+ if (item.material) {
+ sku += '材质:' + item.material + ';';
}
- if (factory) {
- sku += '厂家:' + factory.attrValue + ';';
+ if (item.surfaceTreatmentDesc) {
+ sku += '表面处理:' + item.surfaceTreatmentDesc + ';';
}
- if (material) {
- sku += '材质:' + material.attrValue;
+ if (item.manufacturer) {
+ sku += '厂家:' + item.manufacturer + ';';
+ }
+ if (item.zincLayer) {
+ sku += '锌层:' + item.zincLayer + ';';
}
- console.log(sku, '组合sku');
return sku;
},
add() {
diff --git a/klp-ui/src/components/KLPService/Renderer/ProductInfo.vue b/klp-ui/src/components/KLPService/Renderer/ProductInfo.vue
index 9caa53e1..307d3b28 100644
--- a/klp-ui/src/components/KLPService/Renderer/ProductInfo.vue
+++ b/klp-ui/src/components/KLPService/Renderer/ProductInfo.vue
@@ -13,9 +13,9 @@
append-to-body
>
-
+
{{ product.productName || '--' }}
@@ -25,8 +25,23 @@
{{ product.specification || '--' }}
+
+ {{ product.material || '--' }}
+
+
+ {{ product.surfaceTreatment || '--' }}
+
+
+
+ {{ product.zincLayer || '--' }}
+
+
+
+ {{ product.manufacturer || '--' }}
+
+
-
+
diff --git a/klp-ui/src/components/KLPService/Renderer/RawMaterialInfo.vue b/klp-ui/src/components/KLPService/Renderer/RawMaterialInfo.vue
index fae21e1a..4b77c576 100644
--- a/klp-ui/src/components/KLPService/Renderer/RawMaterialInfo.vue
+++ b/klp-ui/src/components/KLPService/Renderer/RawMaterialInfo.vue
@@ -13,8 +13,22 @@
{{ material.rawMaterialName }}
{{ material.rawMaterialCode }}
{{ material.specification }}
+
+ {{ material.material || '--' }}
+
+
+ {{ material.surfaceTreatment || '--' }}
+
+
+
+ {{ material.zincLayer || '--' }}
+
+
+
+ {{ material.manufacturer || '--' }}
+
-
+
diff --git a/klp-ui/src/store/modules/category.js b/klp-ui/src/store/modules/category.js
index f7a0cdfa..94061017 100644
--- a/klp-ui/src/store/modules/category.js
+++ b/klp-ui/src/store/modules/category.js
@@ -1,6 +1,6 @@
import { listCategory } from '@/api/wms/category';
-import { listProductWithBom } from '@/api/wms/product';
-import { listRawMaterialWithBom } from '@/api/wms/rawMaterial';
+import { listProduct } from '@/api/wms/product';
+import { listRawMaterial } from '@/api/wms/rawMaterial';
import { listBomItem } from '@/api/wms/bomItem';
// 目前存在一个问题,当新增或删除,修改分类、产品、物料时,需要刷新整个页面,才能看到最新的数据
@@ -51,7 +51,7 @@ const actions = {
if (Object.keys(state.productMap).length > 0) {
return Promise.resolve(state.productMap);
}
- return listProductWithBom({ pageNum: 1, pageSize: 10000 }).then(res => {
+ return listProduct({ pageNum: 1, pageSize: 10000 }).then(res => {
const map = {};
res.rows.forEach(item => {
map[item.productId] = item;
@@ -65,7 +65,7 @@ const actions = {
if (Object.keys(state.rawMaterialMap).length > 0) {
return Promise.resolve(state.rawMaterialMap);
}
- return listRawMaterialWithBom({ pageNum: 1, pageSize: 10000 }).then(res => {
+ return listRawMaterial({ pageNum: 1, pageSize: 10000 }).then(res => {
const map = {};
res.rows.forEach(item => {
map[item.rawMaterialId] = item;
diff --git a/klp-ui/src/views/wms/coil/panels/base.vue b/klp-ui/src/views/wms/coil/panels/base.vue
index 1ad202d5..f6884f95 100644
--- a/klp-ui/src/views/wms/coil/panels/base.vue
+++ b/klp-ui/src/views/wms/coil/panels/base.vue
@@ -86,12 +86,12 @@
- {{ product.productName }}({{ product.productCode }})
+ {{ product.productName }}[{{ product.specification }}]
- {{ material.rawMaterialName }}({{ material.rawMaterialCode }})
+ {{ material.rawMaterialName }}[{{ material.specification }}]
@@ -181,7 +181,7 @@
-
+
@@ -199,20 +199,20 @@
-
+
diff --git a/klp-ui/src/views/wms/coil/split.vue b/klp-ui/src/views/wms/coil/split.vue
index e137d172..eb3ce070 100644
--- a/klp-ui/src/views/wms/coil/split.vue
+++ b/klp-ui/src/views/wms/coil/split.vue
@@ -120,25 +120,25 @@
-
+
-
+
-
+
-
+
diff --git a/klp-ui/src/views/wms/product/index.vue b/klp-ui/src/views/wms/product/index.vue
index f7113047..fc91a26f 100644
--- a/klp-ui/src/views/wms/product/index.vue
+++ b/klp-ui/src/views/wms/product/index.vue
@@ -2,20 +2,10 @@
-
+
-
+
@@ -23,28 +13,18 @@
-
搜索
重置
@@ -53,43 +33,18 @@
- 新增
+ 新增
- 修改
+ 修改
- 删除
+ 删除
- 导出
+ 导出
@@ -100,163 +55,72 @@
-
+
+
+
+
-
+
-
+
- 修改
- 删除
-
- 参数
+ 修改
+ 删除
+
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
-
-
-
-
+
+
+
-
-
+
@@ -275,8 +140,8 @@ import { listProduct, getProduct, delProduct, addProduct, updateProduct, addProd
import CategorySelect from '@/components/KLPService/CategorySelect';
import CategoryRenderer from '@/components/KLPService/Renderer/CategoryRenderer.vue';
import UserSelect from '@/components/KLPService/UserSelect';
-import BomPanel from '../bom/components/BomPanel.vue';
-import BomInfoMini from '@/components/KLPService/Renderer/BomInfoMini.vue';
+// import BomPanel from '../bom/components/BomPanel.vue';
+// import BomInfoMini from '@/components/KLPService/Renderer/BomInfoMini.vue';
export default {
name: "Product",
@@ -284,8 +149,8 @@ export default {
CategorySelect,
CategoryRenderer,
UserSelect,
- BomPanel,
- BomInfoMini
+ // BomPanel,
+ // BomInfoMini
},
dicts: ['common_swicth'],
data() {
@@ -327,6 +192,10 @@ export default {
innerDiameter: undefined,
specification: undefined,
isEnabled: undefined,
+ material: undefined,
+ manufacturer: undefined,
+ surfaceTreatmentDesc: undefined,
+ zincLayer: undefined,
},
// 表单参数
form: {},
@@ -392,6 +261,10 @@ export default {
updateBy: undefined,
type: undefined,
specification: undefined,
+ material: undefined,
+ manufacturer: undefined,
+ surfaceTreatmentDesc: undefined,
+ zincLayer: undefined,
};
this.resetForm("form");
},
@@ -422,7 +295,7 @@ export default {
// 多选框选中数据
handleSelectionChange(selection) {
this.ids = selection.map(item => item.productId)
- this.single = selection.length!==1
+ this.single = selection.length !== 1
this.multiple = !selection.length
},
/** 新增按钮操作 */
diff --git a/klp-ui/src/views/wms/rawMaterial/index.vue b/klp-ui/src/views/wms/rawMaterial/index.vue
index 848ef694..baaadae4 100644
--- a/klp-ui/src/views/wms/rawMaterial/index.vue
+++ b/klp-ui/src/views/wms/rawMaterial/index.vue
@@ -20,47 +20,17 @@
-
-
-
-
-
+
+
搜索
@@ -118,33 +88,19 @@
-
-
-
+
+
+
+
+
-
- 参数
+
删除
-
@@ -190,92 +140,21 @@
-
-
-
-
-
+
+
+
-
+
+
+
+
+
+
+
-
-
- {{ paramRow.thickness || '--' }}
- {{ paramRow.thicknessDeviation || '--' }}
- {{ paramRow.width || '--' }}
- {{ paramRow.targetColdWidth || '--' }}
- {{ paramRow.targetColdThickness || '--' }}
- {{ paramRow.crown || '--' }}
- {{ paramRow.coilWeight || '--' }}
- {{ paramRow.surfaceQuality || '--' }}
-
-
-
-
-
+
@@ -307,16 +172,16 @@
import { listRawMaterial, getRawMaterial, delRawMaterial, addRawMaterial, updateRawMaterial, addRawMaterialWithBom } from "@/api/wms/rawMaterial";
import CategorySelect from "@/components/KLPService/CategorySelect/index.vue";
import CategoryRenderer from '@/components/KLPService/Renderer/CategoryRenderer.vue';
-import BomPanel from '@/views/wms/bom/components/BomPanel.vue';
-import BomInfoMini from '@/components/KLPService/Renderer/BomInfoMini.vue';
+// import BomPanel from '@/views/wms/bom/components/BomPanel.vue';
+// import BomInfoMini from '@/components/KLPService/Renderer/BomInfoMini.vue';
export default {
name: "RawMaterial",
components: {
CategorySelect,
CategoryRenderer,
- BomPanel,
- BomInfoMini
+ // BomPanel,
+ // BomInfoMini
},
dicts: ['common_swicth'],
data() {
@@ -369,6 +234,10 @@ export default {
isEnabled: undefined,
unit: undefined,
specification: undefined,
+ material: undefined,
+ manufacturer: undefined,
+ surfaceTreatmentDesc: undefined,
+ zincLayer: undefined,
},
// 表单参数
form: {},
@@ -452,6 +321,10 @@ export default {
updateBy: undefined,
specification: undefined,
unit: '卷',
+ material: undefined,
+ manufacturer: undefined,
+ surfaceTreatmentDesc: undefined,
+ zincLayer: undefined,
};
this.resetForm("form");
},