diff --git a/maintain-business/src/main/java/com/maintain/business/domain/ErpMaterial.java b/maintain-business/src/main/java/com/maintain/business/domain/ErpMaterial.java index 22085580d0adfff73c87ad71e2225153bb75a484..e687e00efe978c80fa1af1bbefe7651a8a644793 100644 --- a/maintain-business/src/main/java/com/maintain/business/domain/ErpMaterial.java +++ b/maintain-business/src/main/java/com/maintain/business/domain/ErpMaterial.java @@ -92,6 +92,10 @@ public class ErpMaterial extends BaseEntity { * 物资品牌 */ private String materialBrand; + /** + * 生产厂家 + */ + private String manufacturer; /** * 采购标的 */ diff --git a/maintain-business/src/main/java/com/maintain/business/domain/bo/ErpMaterialBo.java b/maintain-business/src/main/java/com/maintain/business/domain/bo/ErpMaterialBo.java index 82f203f8a8b9978c1764364c16a79b6701c696bf..8212e056e3a60b2c36e962838961e965fb5e874a 100644 --- a/maintain-business/src/main/java/com/maintain/business/domain/bo/ErpMaterialBo.java +++ b/maintain-business/src/main/java/com/maintain/business/domain/bo/ErpMaterialBo.java @@ -114,6 +114,10 @@ public class ErpMaterialBo extends BaseEntity { * 物资品牌 */ private String materialBrand; + /** + * 生产厂家 + */ + private String manufacturer; /** * 采购标的 */ diff --git a/maintain-business/src/main/java/com/maintain/business/domain/vo/ErpMaterialVo.java b/maintain-business/src/main/java/com/maintain/business/domain/vo/ErpMaterialVo.java index f968693e239e36f67150a0e8bb88d4a97125f82a..227965e8992d6280857506f09bb9530d48f60a3f 100644 --- a/maintain-business/src/main/java/com/maintain/business/domain/vo/ErpMaterialVo.java +++ b/maintain-business/src/main/java/com/maintain/business/domain/vo/ErpMaterialVo.java @@ -122,6 +122,11 @@ public class ErpMaterialVo implements Serializable { */ @ExcelProperty(value = "物资品牌") private String materialBrand; + /** + * 生产厂家 + */ + @ExcelProperty(value = "生产厂家") + private String manufacturer; /** * 采购标的 */ diff --git a/maintain-business/src/main/java/com/maintain/business/listener/ErpMaterialImportListener.java b/maintain-business/src/main/java/com/maintain/business/listener/ErpMaterialImportListener.java index 8c88c6a5fd0ec9f216e5db9d2d8666d7647a6e08..710f61792b453ced5afaada8c996799d1439a457 100644 --- a/maintain-business/src/main/java/com/maintain/business/listener/ErpMaterialImportListener.java +++ b/maintain-business/src/main/java/com/maintain/business/listener/ErpMaterialImportListener.java @@ -84,21 +84,21 @@ public class ErpMaterialImportListener extends AnalysisEventListener materialTypes = materialTypeMapper.selectList(new LambdaQueryWrapper().eq(ErpMaterialType::getTypeName, material.getMaterialTypeName())); - if (materialTypes.isEmpty()) { - ErpMaterialType materialType = new ErpMaterialType(); - materialType.setTypeName(material.getMaterialTypeName()); - materialType.setParentId(1L); - materialType.setAncestors("0,1"); - materialTypeMapper.insert(materialType); - material.setMaterialTypeId(materialType.getTypeId()); - }else { - material.setMaterialTypeId(materialTypes.get(0).getTypeId()); - } - } +// if (StringUtils.isNotEmpty(material.getMaterialTypeName())) { +// List materialTypes = materialTypeMapper.selectList(new LambdaQueryWrapper().eq(ErpMaterialType::getTypeName, material.getMaterialTypeName())); +// if (materialTypes.isEmpty()) { +// ErpMaterialType materialType = new ErpMaterialType(); +// materialType.setTypeName(material.getMaterialTypeName()); +// materialType.setParentId(1L); +// materialType.setAncestors("0,1"); +// materialTypeMapper.insert(materialType); +// material.setMaterialTypeId(materialType.getTypeId()); +// }else { +// material.setMaterialTypeId(materialTypes.get(0).getTypeId()); +// } +// } /** * 供应商 */ @@ -114,22 +114,22 @@ public class ErpMaterialImportListener extends AnalysisEventListener().eq(ErpWarehouseLocation::getLocationType, material.getWarehouseLocationType())); - if (ObjectUtil.isNull(warehouseLocation)) { - ErpWarehouseLocation location = new ErpWarehouseLocation(); - location.setLocationCode(material.getWarehouseLocationType()); - location.setLocationType(material.getWarehouseLocationType()); - warehouseLocationMapper.insert(location); - material.setWarehouseLocationCode(location.getLocationCode()); - material.setWarehouseLocationId(location.getId()); - } else { - material.setWarehouseLocationCode(warehouseLocation.getLocationCode()); - material.setWarehouseLocationId(warehouseLocation.getId()); - } - } +// if (StringUtils.isNotEmpty(material.getWarehouseLocationType())) { +// ErpWarehouseLocation warehouseLocation = warehouseLocationMapper.selectOne(new LambdaQueryWrapper().eq(ErpWarehouseLocation::getLocationType, material.getWarehouseLocationType())); +// if (ObjectUtil.isNull(warehouseLocation)) { +// ErpWarehouseLocation location = new ErpWarehouseLocation(); +// location.setLocationCode(material.getWarehouseLocationType()); +// location.setLocationType(material.getWarehouseLocationType()); +// warehouseLocationMapper.insert(location); +// material.setWarehouseLocationCode(location.getLocationCode()); +// material.setWarehouseLocationId(location.getId()); +// } else { +// material.setWarehouseLocationCode(warehouseLocation.getLocationCode()); +// material.setWarehouseLocationId(warehouseLocation.getId()); +// } +// } materialMapper.insert(material); successNum++; successMsg.append("
").append(successNum).append("、物料 【").append(material.getMaterialName()).append("】 导入成功"); @@ -141,19 +141,19 @@ public class ErpMaterialImportListener extends AnalysisEventListener materialTypes = materialTypeMapper.selectList(new LambdaQueryWrapper().eq(ErpMaterialType::getTypeName, material.getMaterialTypeName())); - if (materialTypes.isEmpty()) { - ErpMaterialType materialType = new ErpMaterialType(); - materialType.setTypeName(material.getMaterialTypeName()); - materialType.setParentId(1L); - materialType.setAncestors("0,1"); - materialTypeMapper.insert(materialType); - material.setMaterialTypeId(materialType.getTypeId()); - }else { - material.setMaterialTypeId(materialTypes.get(0).getTypeId()); - } - } +// if (StringUtils.isNotEmpty(material.getMaterialTypeName())) { +// List materialTypes = materialTypeMapper.selectList(new LambdaQueryWrapper().eq(ErpMaterialType::getTypeName, material.getMaterialTypeName())); +// if (materialTypes.isEmpty()) { +// ErpMaterialType materialType = new ErpMaterialType(); +// materialType.setTypeName(material.getMaterialTypeName()); +// materialType.setParentId(1L); +// materialType.setAncestors("0,1"); +// materialTypeMapper.insert(materialType); +// material.setMaterialTypeId(materialType.getTypeId()); +// }else { +// material.setMaterialTypeId(materialTypes.get(0).getTypeId()); +// } +// } /** * 物资仓库 */ @@ -186,18 +186,18 @@ public class ErpMaterialImportListener extends AnalysisEventListener().eq(ErpWarehouseLocation::getLocationType, material.getWarehouseLocationType())); - if (ObjectUtil.isNull(warehouseLocation)) { - ErpWarehouseLocation location = new ErpWarehouseLocation(); - location.setLocationCode(material.getWarehouseLocationType()); - location.setLocationType(material.getWarehouseLocationType()); - warehouseLocationMapper.insert(location); - material.setWarehouseLocationId(location.getId()); - } else { - material.setWarehouseLocationId(warehouseLocation.getId()); - } - } +// if (StringUtils.isNotEmpty(material.getWarehouseLocationType())) { +// ErpWarehouseLocation warehouseLocation = warehouseLocationMapper.selectOne(new LambdaQueryWrapper().eq(ErpWarehouseLocation::getLocationType, material.getWarehouseLocationType())); +// if (ObjectUtil.isNull(warehouseLocation)) { +// ErpWarehouseLocation location = new ErpWarehouseLocation(); +// location.setLocationCode(material.getWarehouseLocationType()); +// location.setLocationType(material.getWarehouseLocationType()); +// warehouseLocationMapper.insert(location); +// material.setWarehouseLocationId(location.getId()); +// } else { +// material.setWarehouseLocationId(warehouseLocation.getId()); +// } +// } materialMapper.updateById(material); successNum++; successMsg.append("
").append(successNum).append("、物料 ").append(material.getMaterialName()).append(" 更新成功"); diff --git a/maintain-business/src/main/java/com/maintain/business/service/impl/ErpMaterialInventoryRecordServiceImpl.java b/maintain-business/src/main/java/com/maintain/business/service/impl/ErpMaterialInventoryRecordServiceImpl.java index 173aee3ad37801741765567a29ae637cefaa962c..7794f8a98f9fdb3768798f15e60c4d4ba90e5cbb 100644 --- a/maintain-business/src/main/java/com/maintain/business/service/impl/ErpMaterialInventoryRecordServiceImpl.java +++ b/maintain-business/src/main/java/com/maintain/business/service/impl/ErpMaterialInventoryRecordServiceImpl.java @@ -89,7 +89,7 @@ public class ErpMaterialInventoryRecordServiceImpl implements IErpMaterialInvent .like(StringUtils.isNotBlank(bo.getMaterialCode()),"t.material_code", bo.getMaterialCode()) .like(null != bo.getVendorId(),"t.vendor_id", bo.getVendorId()) .like(null != bo.getWarehouseId(), "t.warehouse_id", bo.getWarehouseId()) - .in(!bo.getWarehouseIdList().isEmpty(), "t.warehouse_id", bo.getWarehouseIdList()) + .in(null != bo.getWarehouseIdList(), "t.warehouse_id", bo.getWarehouseIdList()) .ge(null != bo.getInventory(), "t.inventory", bo.getInventory()) .orderByDesc("t.create_time"); Page queryPageList = baseMapper.customQueryPageInventoryList(pageQuery.build(), query); diff --git a/maintain-ui/src/views/business/material/index.vue b/maintain-ui/src/views/business/material/index.vue index 8bbd9e65e1ca46dea5c56bf7410d942480a1f822..b4a62ac3dd30033581bdbae14f8ac6d4f2d6dd98 100644 --- a/maintain-ui/src/views/business/material/index.vue +++ b/maintain-ui/src/views/business/material/index.vue @@ -138,27 +138,28 @@ + - + + + - - - - - + + + - + @@ -168,7 +169,7 @@ - + @@ -202,7 +203,7 @@ /> - + @@ -236,14 +237,14 @@ - + - + @@ -281,10 +282,8 @@ - - - - + + @@ -304,6 +303,13 @@ + + + + + + + @@ -414,8 +420,7 @@ export default { materialSpecifications: undefined, materialUnit: undefined, materialWarrantyPeriod: undefined, - referencePrice: undefined, - sellingPrice: undefined, + manufacturer: undefined, inventory: undefined, isEnable: undefined, isUniversal: undefined, @@ -545,6 +550,7 @@ export default { materialSpecifications: undefined, materialUnit: undefined, materialBrand: undefined, + manufacturer: undefined, procurementSubject: undefined, compatibleWith: undefined, materialUrl: undefined, diff --git a/maintain-ui/src/views/business/materialPicking/add.vue b/maintain-ui/src/views/business/materialPicking/add.vue index e344afe59a273ed675657ed9ec37def9b43edc12..558935f6e26fcc8b080b8870c71135a5bd80cce8 100644 --- a/maintain-ui/src/views/business/materialPicking/add.vue +++ b/maintain-ui/src/views/business/materialPicking/add.vue @@ -86,7 +86,7 @@ @@ -96,7 +96,7 @@ @@ -260,7 +260,7 @@ export default { }; }, created() { - this.form = {...this.$route.query} + this.form = {...this.$route.query, outMoney: undefined} this.getWarehouseList(this.form.repairerDeptId) this.getVendorList() }, @@ -289,7 +289,9 @@ export default { }, /** 供应商改变 */ vendorIdChange(vendorId) { - this.queryMaterialParams.vendorId = vendorId; + if (vendorId) { + this.queryMaterialParams.vendorId = vendorId; + } this.form.pickingInfoList = [] }, /** 打开物料列表 */ @@ -348,6 +350,7 @@ export default { item.money = item.collectNumber * item.sellingPrice return sum + (item.collectNumber * item.sellingPrice); }, 0) + console.log('outMoney', this.form.outMoney) }, // 多选框选中数据 handleMaterialSelectionChange(selection) { diff --git a/maintain-ui/src/views/business/materialPicking/index.vue b/maintain-ui/src/views/business/materialPicking/index.vue index ce86aba494dc7296ebb1763425d2b29065c0efc5..58201bfd2e0221199d42df01d9c14e4f3dc88447 100644 --- a/maintain-ui/src/views/business/materialPicking/index.vue +++ b/maintain-ui/src/views/business/materialPicking/index.vue @@ -274,7 +274,7 @@ @@ -284,7 +284,7 @@ @@ -612,8 +612,8 @@ export default { // 入库数量变动 collectNumberChange() { this.form.outMoney = this.form.pickingInfoList.reduce((sum, item) => { - item.money = item.collectNumber * item.price - return sum + (item.collectNumber * item.price); + item.money = item.collectNumber * item.sellingPrice + return sum + (item.collectNumber * item.sellingPrice); }, 0) }, // 多选框选中数据 diff --git a/maintain-ui/src/views/business/materialPickingInfo/index.vue b/maintain-ui/src/views/business/materialPickingInfo/index.vue index 67bab5842d5f76b36eb9739c1d43ec9519844a29..9a37cbb0902b5f78bdd86e3240aff6d9b6bed96e 100644 --- a/maintain-ui/src/views/business/materialPickingInfo/index.vue +++ b/maintain-ui/src/views/business/materialPickingInfo/index.vue @@ -119,7 +119,7 @@ - + diff --git a/maintain-ui/src/views/business/materialPutaway/index.vue b/maintain-ui/src/views/business/materialPutaway/index.vue index 2a2b157ebb362865d2972faf1c9774ec3e061bb4..47a31bd175a98877637f7044916e1bd79e896570 100644 --- a/maintain-ui/src/views/business/materialPutaway/index.vue +++ b/maintain-ui/src/views/business/materialPutaway/index.vue @@ -266,17 +266,17 @@ @@ -712,6 +712,19 @@ export default { this.buttonLoading = false; return } + + let vendorIsNull = false + this.form.putawayInfoList.forEach(item =>{ + if (!item.vendorId) { + vendorIsNull = true + } + }) + if (vendorIsNull) { + this.$modal.msgError('入库明细列表物料供应商不能为空') + this.buttonLoading = false; + return + } + this.form.putawayInfoList.forEach(item =>{ item.materialId = item.materialId || item.id }) diff --git a/maintain-ui/src/views/business/materialReturns/index.vue b/maintain-ui/src/views/business/materialReturns/index.vue index 3054c08748150e15f41dbe1bdef4959f0b6d1e72..349f8f9ddb9414f0be9b0f263d398b087ab7bf7b 100644 --- a/maintain-ui/src/views/business/materialReturns/index.vue +++ b/maintain-ui/src/views/business/materialReturns/index.vue @@ -242,7 +242,7 @@ @@ -400,15 +400,15 @@ export default { // 退货数量更改 returnsNumberChange() { this.form.returnsMoney = this.materialList.reduce((sum, item) => { - item.returnsMoney = item.returnsNumber * item.returnsPrice - return sum + (item.returnsNumber * item.returnsPrice); + item.returnsMoney = parseFloat(item.returnsNumber) * parseFloat(item.returnsPrice) + return sum + (parseFloat(item.returnsNumber) * parseFloat(item.returnsPrice)); }, 0) }, // 入库明细删除 handleRowDelete(row) { this.materialList = this.materialList.filter(item => item.id !== row.id); this.form.returnsMoney = this.materialList.reduce((sum, item) => { - return sum + (item.returnsNumber * item.returnsPrice); + return sum + (parseFloat(item.returnsNumber) * parseFloat(item.returnsPrice)); }, 0) }, // 取消按钮