From 9db17759174043d4eb8f80840dcef6323b6be7d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=A2=81=E9=94=8B?= Date: Wed, 5 Nov 2025 21:01:10 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=20=E4=BA=A7=E5=93=81?= =?UTF-8?q?=E5=AF=BC=E5=85=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../productinfo/ProductInfoServiceImpl.java | 19 ++++++++------- .../src/views/oms/productinfo/index.vue | 24 ++++++++++++++++++- 2 files changed, 34 insertions(+), 9 deletions(-) diff --git a/hangtag-module-oms/hangtag-module-oms-biz/src/main/java/cn/hangtag/module/oms/service/productinfo/ProductInfoServiceImpl.java b/hangtag-module-oms/hangtag-module-oms-biz/src/main/java/cn/hangtag/module/oms/service/productinfo/ProductInfoServiceImpl.java index 0677a59..2257ab2 100644 --- a/hangtag-module-oms/hangtag-module-oms-biz/src/main/java/cn/hangtag/module/oms/service/productinfo/ProductInfoServiceImpl.java +++ b/hangtag-module-oms/hangtag-module-oms-biz/src/main/java/cn/hangtag/module/oms/service/productinfo/ProductInfoServiceImpl.java @@ -307,6 +307,8 @@ public class ProductInfoServiceImpl implements ProductInfoService { continue; } ProductInfoDO productInfo = new ProductInfoDO(); + productInfo.setName(excelVO.getName()); + String code = excelVO.getCode(); if(FuncUtil.isNotEmpty(code)){ try { @@ -317,18 +319,20 @@ public class ProductInfoServiceImpl implements ProductInfoService { lambdaQueryWrapper.last("limit 1"); ProductInfoDO dos = productInfoMapper.selectOne(lambdaQueryWrapper); if(FuncUtil.isNotEmpty(dos)){ + + // 合并属性 BeanUtil.copyProperties(dos, productInfo); + productInfo.setName(excelVO.getName()); + productInfo.setSummary(excelVO.getIntroduction()); productInfo.setId(dos.getId()); String brandName = excelVO.getBrandName(); productInfo.setCode(code); - productInfo.setTemplateType("2"); - - productInfo.setSpecSizeWidth(FuncUtil.toDouble(excelVO.getSpecWidth())); - productInfo.setSpecSizeHeight(FuncUtil.toDouble(excelVO.getSpecHeight())); - productInfo.setSpecSizeThk(FuncUtil.toDouble(excelVO.getSpecThickness())); - productInfo.setSpecMaterial(excelVO.getMaterial()); - productInfo.setRemark(excelVO.getRemarks()); + productInfo.setSpecSizeWidth(FuncUtil.toDouble(excelVO.getSpecWidth(),null)); + productInfo.setSpecSizeHeight(FuncUtil.toDouble(excelVO.getSpecHeight(),null)); + productInfo.setSpecSizeThk(FuncUtil.toDouble(excelVO.getSpecThickness(),null)); + productInfo.setSpecMaterial(FuncUtil.toStr(excelVO.getMaterial(),null)); + productInfo.setRemark(FuncUtil.toStr(excelVO.getRemarks(),null)); Long productTypeId = toProductTypeId(excelVO.getProductType()); productInfo.setProductTypeId(productTypeId); @@ -358,7 +362,6 @@ public class ProductInfoServiceImpl implements ProductInfoService { if(FuncUtil.isEmpty(code)){ return "第"+(i+1)+"行编码为空:"+code; } - productInfo.setName(excelVO.getName()); String brandName = excelVO.getBrandName(); productInfo.setCode(code); productInfo.setTemplateType("2"); diff --git a/hangtag-ui/hangtag-ui-admin/src/views/oms/productinfo/index.vue b/hangtag-ui/hangtag-ui-admin/src/views/oms/productinfo/index.vue index 5bb3db2..e7a9828 100644 --- a/hangtag-ui/hangtag-ui-admin/src/views/oms/productinfo/index.vue +++ b/hangtag-ui/hangtag-ui-admin/src/views/oms/productinfo/index.vue @@ -122,6 +122,9 @@ 下载产品导入模版 +
+ 多行显示 +
@@ -130,7 +133,8 @@ - + + @@ -211,6 +215,7 @@ import ProductInfoForm from './ProductInfoForm.vue' import ProductInfoExcelImport from './ProductInfoExcelImport.vue' import {ProductTypeApi} from "@/api/base/producttype"; import {buildQuery} from "@/utils/queryUtil"; +import {multiply} from "lodash-es"; /** 产品资料 列表 */ defineOptions({name: 'ProductInfo'}) @@ -313,6 +318,9 @@ const that = reactive({ productTypeOptions: [], }) const init = async () => { + + multiplyRow.value = localStorage.getItem('prod_list_multiplyRow') !== '0' + ProductTypeApi.getProductTypePage({ pageNo: 1, pageSize: 100 @@ -360,4 +368,18 @@ const downloadTemplate = ()=>{ const handleImport = () => { excelImportRef.value.open() } +const multiplyRow = ref(true) +const showTable = ref(true) +const changeRowSetting = ()=>{ + localStorage.setItem('prod_list_multiplyRow', multiplyRow.value ? "1" : "0") + showTable.value = false; + setTimeout(()=>{ + showTable.value = true; + },300) +} +