diff --git a/hangtag-module-oms/hangtag-module-oms-biz/src/main/java/cn/hangtag/module/oms/controller/admin/productcareitem/vo/ProductCareItemPageReqVO.java b/hangtag-module-oms/hangtag-module-oms-biz/src/main/java/cn/hangtag/module/oms/controller/admin/productcareitem/vo/ProductCareItemPageReqVO.java index 67a4c78..eaa2a53 100644 --- a/hangtag-module-oms/hangtag-module-oms-biz/src/main/java/cn/hangtag/module/oms/controller/admin/productcareitem/vo/ProductCareItemPageReqVO.java +++ b/hangtag-module-oms/hangtag-module-oms-biz/src/main/java/cn/hangtag/module/oms/controller/admin/productcareitem/vo/ProductCareItemPageReqVO.java @@ -21,6 +21,12 @@ public class ProductCareItemPageReqVO extends PageParam { @Schema(description = "类型 字典oms_product_care_item_type", example = "2") private String type; + /** + * 1洗涤 2漂白 3烘干 4自然干燥 5熨烫 6专业纺织品护理工艺 + * 产品护理过程类型 字典 oms_product_care_process_type + */ + private String processType; + @Schema(description = "语言对照") private String langMapping; diff --git a/hangtag-module-oms/hangtag-module-oms-biz/src/main/java/cn/hangtag/module/oms/controller/admin/productcareitem/vo/ProductCareItemRespVO.java b/hangtag-module-oms/hangtag-module-oms-biz/src/main/java/cn/hangtag/module/oms/controller/admin/productcareitem/vo/ProductCareItemRespVO.java index 08b2971..c9d92c7 100644 --- a/hangtag-module-oms/hangtag-module-oms-biz/src/main/java/cn/hangtag/module/oms/controller/admin/productcareitem/vo/ProductCareItemRespVO.java +++ b/hangtag-module-oms/hangtag-module-oms-biz/src/main/java/cn/hangtag/module/oms/controller/admin/productcareitem/vo/ProductCareItemRespVO.java @@ -24,6 +24,12 @@ public class ProductCareItemRespVO { @ExcelProperty("类型 字典oms_product_care_item_type") private String type; + /** + * 1洗涤 2漂白 3烘干 4自然干燥 5熨烫 6专业纺织品护理工艺 + * 产品护理过程类型 字典 oms_product_care_process_type + */ + private String processType; + @Schema(description = "语言对照") @ExcelProperty("语言对照") private String langMapping; diff --git a/hangtag-module-oms/hangtag-module-oms-biz/src/main/java/cn/hangtag/module/oms/controller/admin/productcareitem/vo/ProductCareItemSaveReqVO.java b/hangtag-module-oms/hangtag-module-oms-biz/src/main/java/cn/hangtag/module/oms/controller/admin/productcareitem/vo/ProductCareItemSaveReqVO.java index a3469e9..46f8942 100644 --- a/hangtag-module-oms/hangtag-module-oms-biz/src/main/java/cn/hangtag/module/oms/controller/admin/productcareitem/vo/ProductCareItemSaveReqVO.java +++ b/hangtag-module-oms/hangtag-module-oms-biz/src/main/java/cn/hangtag/module/oms/controller/admin/productcareitem/vo/ProductCareItemSaveReqVO.java @@ -18,6 +18,11 @@ public class ProductCareItemSaveReqVO { @Schema(description = "类型 字典oms_product_care_item_type", example = "2") private String type; + /** + * 1洗涤 2漂白 3烘干 4自然干燥 5熨烫 6专业纺织品护理工艺 + * 产品护理过程类型 字典 oms_product_care_process_type + */ + private String processType; @Schema(description = "语言对照") private String langMapping; diff --git a/hangtag-module-oms/hangtag-module-oms-biz/src/main/java/cn/hangtag/module/oms/dal/dataobject/productcareitem/ProductCareItemDO.java b/hangtag-module-oms/hangtag-module-oms-biz/src/main/java/cn/hangtag/module/oms/dal/dataobject/productcareitem/ProductCareItemDO.java index eba8afb..0ed75f7 100644 --- a/hangtag-module-oms/hangtag-module-oms-biz/src/main/java/cn/hangtag/module/oms/dal/dataobject/productcareitem/ProductCareItemDO.java +++ b/hangtag-module-oms/hangtag-module-oms-biz/src/main/java/cn/hangtag/module/oms/dal/dataobject/productcareitem/ProductCareItemDO.java @@ -31,10 +31,18 @@ public class ProductCareItemDO extends BaseDO { * 说明 */ private String value; + /** + * 1成分比例 2 图文说明 3 文字说明 4 尺码 * 类型 字典oms_product_care_item_type */ private String type; + + /** + * 1洗涤 2漂白 3烘干 4自然干燥 5熨烫 6专业纺织品护理工艺 + * 产品护理过程类型 字典 oms_product_care_process_type + */ + private String processType; /** * 语言对照 */ diff --git a/hangtag-ui/hangtag-ui-admin/src/components/DraftDesign/components/DesignPropEdit.vue b/hangtag-ui/hangtag-ui-admin/src/components/DraftDesign/components/DesignPropEdit.vue index 1227ffc..b89de94 100644 --- a/hangtag-ui/hangtag-ui-admin/src/components/DraftDesign/components/DesignPropEdit.vue +++ b/hangtag-ui/hangtag-ui-admin/src/components/DraftDesign/components/DesignPropEdit.vue @@ -213,7 +213,7 @@ { } } +const findProcessTypeIndex = (index) => { + if(index < 0){ + return index; + } + let processType = 0; -const washingInfoListByType = (type) => { - return that.washingInfoList.filter(item => item.type === type) + for (let i = 0; i < that.propOrderByList.length; i++) { + + // 找到最后一个位置 + if (that.propOrderByList[i].shape === ShapeType.vueShapeImage) { + processType++; + console.log("@@@@@@",index,i) + if(index === i){ + return processType + } + } + } + return processType; + +} +const washingInfoListByType = (type,index = -1) => { + const typeIndex = findProcessTypeIndex(index); + return that.washingInfoList.filter(item => { + if (item.type === type && (typeIndex < 0 || (item.processType === `${typeIndex}`))) { + return item + } + }) } const getIngredientInfoListByType = (type) => { return that.ingredientInfoList.filter(item => item.type === type) @@ -837,6 +861,7 @@ const queryUseLabel = (label) => { label: item.value, type: item.type, isCombo: item.isCombo, + processType: item.processType, langMapping: JSON.parse(item.langMapping || '{}'), url: replaceDomain(domain, item.iconUrl) } @@ -941,6 +966,7 @@ const checkPropInfo = (info) => { ratio: newInfo[key].dataInfo[j].ratio, locale: newInfo[key].dataInfo[j].locale }); + if (newInfo[key].dataInfo[j].ratio > maxRatio) { useMessage().alert(getLabelName(newInfo[key]) + "违反含有量的成分比例,由大到小依序排列") } diff --git a/hangtag-ui/hangtag-ui-admin/src/components/DraftDesign/config/constant.ts b/hangtag-ui/hangtag-ui-admin/src/components/DraftDesign/config/constant.ts index e06cf3e..7669cc8 100644 --- a/hangtag-ui/hangtag-ui-admin/src/components/DraftDesign/config/constant.ts +++ b/hangtag-ui/hangtag-ui-admin/src/components/DraftDesign/config/constant.ts @@ -9,3 +9,12 @@ export enum GroupTypeEnum { TEXT = '3', SIZE = '4' } +// 1洗涤 2漂白 3烘干 4自然干燥 5熨烫 6专业纺织品护理工艺 +export enum ProcessTypeEnum { + WASH = '1', + WHITE = '2', + DRY = '3', + NATURAL = '4', + IRON = '5', + PROFESSIONAL = '6' +} diff --git a/hangtag-ui/hangtag-ui-admin/src/utils/dict.ts b/hangtag-ui/hangtag-ui-admin/src/utils/dict.ts index 5becfe8..0486488 100644 --- a/hangtag-ui/hangtag-ui-admin/src/utils/dict.ts +++ b/hangtag-ui/hangtag-ui-admin/src/utils/dict.ts @@ -218,5 +218,6 @@ export enum DICT_TYPE { OMS_BILL_STATUS = 'oms_bill_status', // 单据状态 OMS_ORDER_STATUS = 'oms_order_status',// 订单状态 OMS_PRODUCT_CARE_ITEM_TYPE = 'oms_product_care_item_type', //产品保养项目类型 1.成分说明 2.洗涤说明 3.使用说明 4.尺码 + OMS_PRODUCT_CARE_PROCESS_TYPE = 'oms_product_care_process_type', //产品护理过程类型 1洗涤 2漂白 3烘干 4自然干燥 5熨烫 6专业纺织品护理工艺 } diff --git a/hangtag-ui/hangtag-ui-admin/src/views/oms/productcareitem/ProductCareItemForm.vue b/hangtag-ui/hangtag-ui-admin/src/views/oms/productcareitem/ProductCareItemForm.vue index 381e380..ee010b3 100644 --- a/hangtag-ui/hangtag-ui-admin/src/views/oms/productcareitem/ProductCareItemForm.vue +++ b/hangtag-ui/hangtag-ui-admin/src/views/oms/productcareitem/ProductCareItemForm.vue @@ -32,9 +32,19 @@ - + + + + + + 该保养说明适用于所有品牌 @@ -178,6 +188,7 @@ const formData = ref({ id: undefined, value: undefined, iconUrl: '', + processType: undefined, type: '1', brandIds: '', isCombo: true, @@ -347,6 +358,7 @@ const resetForm = () => { type: '1', brandIds: '', iconUrl: '', + processType: undefined, isCombo: true, isAll: true, locale: 'zh-CN', diff --git a/hangtag-ui/hangtag-ui-admin/src/views/oms/productcareitem/index.vue b/hangtag-ui/hangtag-ui-admin/src/views/oms/productcareitem/index.vue index e4d5964..548de7b 100644 --- a/hangtag-ui/hangtag-ui-admin/src/views/oms/productcareitem/index.vue +++ b/hangtag-ui/hangtag-ui-admin/src/views/oms/productcareitem/index.vue @@ -233,6 +233,8 @@ const handleExport = async () => { let first_load = true; /** 初始化 **/ onMounted(() => { + // 文字说明 和尺码 + queryParams.type = '3,4' if(first_load){ first_load = false; queryParams.type = route.query.type diff --git a/hangtag-ui/hangtag-ui-admin/src/views/oms/productcareitem2/ProductCareItemForm.vue b/hangtag-ui/hangtag-ui-admin/src/views/oms/productcareitem2/ProductCareItemForm.vue new file mode 100644 index 0000000..ecacc94 --- /dev/null +++ b/hangtag-ui/hangtag-ui-admin/src/views/oms/productcareitem2/ProductCareItemForm.vue @@ -0,0 +1,382 @@ + + + + diff --git a/hangtag-ui/hangtag-ui-admin/src/views/oms/productcareitem2/index.vue b/hangtag-ui/hangtag-ui-admin/src/views/oms/productcareitem2/index.vue new file mode 100644 index 0000000..17311c6 --- /dev/null +++ b/hangtag-ui/hangtag-ui-admin/src/views/oms/productcareitem2/index.vue @@ -0,0 +1,252 @@ + + + diff --git a/hangtag-ui/hangtag-ui-admin/src/views/oms/productcareitem3/ProductCareItemForm.vue b/hangtag-ui/hangtag-ui-admin/src/views/oms/productcareitem3/ProductCareItemForm.vue new file mode 100644 index 0000000..d109a6d --- /dev/null +++ b/hangtag-ui/hangtag-ui-admin/src/views/oms/productcareitem3/ProductCareItemForm.vue @@ -0,0 +1,384 @@ + + + + diff --git a/hangtag-ui/hangtag-ui-admin/src/views/oms/productcareitem3/index.vue b/hangtag-ui/hangtag-ui-admin/src/views/oms/productcareitem3/index.vue new file mode 100644 index 0000000..f21a9be --- /dev/null +++ b/hangtag-ui/hangtag-ui-admin/src/views/oms/productcareitem3/index.vue @@ -0,0 +1,252 @@ + + + diff --git a/hangtag-ui/hangtag-ui-front/src/components/DraftDesign/components/DesignPropEdit.vue b/hangtag-ui/hangtag-ui-front/src/components/DraftDesign/components/DesignPropEdit.vue index 1227ffc..b89de94 100644 --- a/hangtag-ui/hangtag-ui-front/src/components/DraftDesign/components/DesignPropEdit.vue +++ b/hangtag-ui/hangtag-ui-front/src/components/DraftDesign/components/DesignPropEdit.vue @@ -213,7 +213,7 @@ { } } +const findProcessTypeIndex = (index) => { + if(index < 0){ + return index; + } + let processType = 0; -const washingInfoListByType = (type) => { - return that.washingInfoList.filter(item => item.type === type) + for (let i = 0; i < that.propOrderByList.length; i++) { + + // 找到最后一个位置 + if (that.propOrderByList[i].shape === ShapeType.vueShapeImage) { + processType++; + console.log("@@@@@@",index,i) + if(index === i){ + return processType + } + } + } + return processType; + +} +const washingInfoListByType = (type,index = -1) => { + const typeIndex = findProcessTypeIndex(index); + return that.washingInfoList.filter(item => { + if (item.type === type && (typeIndex < 0 || (item.processType === `${typeIndex}`))) { + return item + } + }) } const getIngredientInfoListByType = (type) => { return that.ingredientInfoList.filter(item => item.type === type) @@ -837,6 +861,7 @@ const queryUseLabel = (label) => { label: item.value, type: item.type, isCombo: item.isCombo, + processType: item.processType, langMapping: JSON.parse(item.langMapping || '{}'), url: replaceDomain(domain, item.iconUrl) } @@ -941,6 +966,7 @@ const checkPropInfo = (info) => { ratio: newInfo[key].dataInfo[j].ratio, locale: newInfo[key].dataInfo[j].locale }); + if (newInfo[key].dataInfo[j].ratio > maxRatio) { useMessage().alert(getLabelName(newInfo[key]) + "违反含有量的成分比例,由大到小依序排列") } diff --git a/hangtag-ui/hangtag-ui-front/src/components/DraftDesign/config/constant.ts b/hangtag-ui/hangtag-ui-front/src/components/DraftDesign/config/constant.ts index e06cf3e..7669cc8 100644 --- a/hangtag-ui/hangtag-ui-front/src/components/DraftDesign/config/constant.ts +++ b/hangtag-ui/hangtag-ui-front/src/components/DraftDesign/config/constant.ts @@ -9,3 +9,12 @@ export enum GroupTypeEnum { TEXT = '3', SIZE = '4' } +// 1洗涤 2漂白 3烘干 4自然干燥 5熨烫 6专业纺织品护理工艺 +export enum ProcessTypeEnum { + WASH = '1', + WHITE = '2', + DRY = '3', + NATURAL = '4', + IRON = '5', + PROFESSIONAL = '6' +}