diff --git a/hangtag-server/src/main/resources/application.yaml b/hangtag-server/src/main/resources/application.yaml index 4f7234f..24291a7 100644 --- a/hangtag-server/src/main/resources/application.yaml +++ b/hangtag-server/src/main/resources/application.yaml @@ -251,8 +251,8 @@ hangtag: expire-times: 10m send-frequency: 1m send-maximum-quantity-per-day: 10 - begin-code: 000001 # 这里配置 9999 的原因是,测试方便。 - end-code: 999999 # 这里配置 9999 的原因是,测试方便。 + begin-code: 9999 # 这里配置 9999 的原因是,测试方便。 + end-code: 9999 # 这里配置 9999 的原因是,测试方便。 trade: order: app-id: 1 # 商户编号 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 2268da4..135ddb5 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 @@ -46,7 +46,7 @@
- +
@@ -66,7 +66,7 @@
- + + { for (let i = 0; i < infoList.length; i++) { mapping[infoList[i].label] = infoList[i].langMapping; } + that.propInfo[key].processType = findProcessTypeIndex(index); // 多语言变量替换 const allData = [...that.propInfo[key].dataInfo] const fLang = allData[0].locale; @@ -563,7 +565,7 @@ const findProcessTypeIndex = (index) => { const washingInfoListByType = (type, index = -1) => { const typeIndex = findProcessTypeIndex(index); return that.washingInfoList.filter(item => { - if (item.type === type && (typeIndex < 0 || (item.processType === `${typeIndex}`))) { + if (`${item.type}` === `${type}` && (typeIndex < 0 || (`${item.processType}` === `${typeIndex}`))) { return item } }) @@ -896,18 +898,17 @@ const checkPropInfo = (info) => { for (let i = 0; i < that.propOrderByList.length; i++) { keys.push(that.propOrderByList[i].key); } - - endloop: for (let i = 0; i < keys.length; i++) { + console.log("keys",keys) + for (let i = 0; i < keys.length; i++) { const key = keys[i]; - // 合并相同语言的文字 - let newArr = []; // 每种语言合并成一句话 const allLang = findGroupAllLang(key, newInfo2); - const firstLang = newInfo[key].dataInfo[0].locale; const linkChar = newInfo[key].linkChar || ''; const dataInfoArr = newInfo[key].dataInfo; let langList = newInfo[key].langList || []; + console.log("newInfo[key].groupType",newInfo[key]) if (newInfo[key].groupType === GroupTypeEnum.RATIO) { + // 成分比例 都进行固定语言组合 // 获取到所以的成分 let langSort = newInfo[key].langSort || []; @@ -937,6 +938,8 @@ const checkPropInfo = (info) => { for (let j = 0; j < langSort.length; j++) { const labelInfo = [] let allRatio = 0; // 累计 比例 + const langLabel = []; + let linkChar = "," for (let k = 0; k < langList.length; k++) { if (langSort[j] === langList[k].locale) { let tmpValue = `${langList[k].value}`.replaceAll('${r}', `${str}`) @@ -946,9 +949,17 @@ const checkPropInfo = (info) => { if (str === null || str === undefined || str === -1) { str = '' } - mergeLabel.push(tmpValue) + console.log("langList[k]",langList[k]) + if(langList[k].linkChar && linkChar != ','){ + linkChar = langList[k] + } + langLabel.push(tmpValue) } } + if(langLabel.length > 0){ + mergeLabel.push(langLabel.join(linkChar)) + } + let flag = false; // 校验 for (let k = 0; k < dataInfoArr.length; k++) { @@ -1006,7 +1017,6 @@ const checkPropInfo = (info) => { if (newInfo[kKey].groupName === newInfo[key].parentId) { newKey = kKey; parentStr = newInfo[kKey].dataInfo[0].label + '
' - break; } } @@ -1021,24 +1031,28 @@ const checkPropInfo = (info) => { // 语言对应自己的自动位置 if (newInfo[key].multiLanguage) { + const showLabel1 = newInfo[key].dataInfo[0].showLabel if (newInfo[key].groupType === GroupTypeEnum.ICON) { const infoList = washingInfoListByType(newInfo[key].groupType) const infos = newInfo[key].dataInfo; for (let j = 1; j < infos.length; j++) { + outerLoop: for (let i = 0; i < infoList.length; i++) { const row1 = infoList[i]; - for (let k = 0; k < row1.langMapping.length; k++) { - // 跳过icon 类型,因为没有url - if (infos[j].locale === row1.langMapping[k].locale) { - infos[j].label = row1.langMapping[k].value - break outerLoop; + if(`${row1.processType}` === `${ newInfo[key].processType}`){ + for (let k = 0; k < row1.langMapping.length; k++) { + // 跳过icon 类型,因为没有url + if (infos[j].locale === row1.langMapping[k].locale && showLabel1 === row1.value) { + infos[j].label = row1.langMapping[k].value + break outerLoop; + } } } } } console.log("newArr33",infos) newInfo[key].dataInfo = infos; - break; + }else { const infoList = washingInfoListByType(newInfo[key].groupType) const infos = newInfo[key].dataInfo; @@ -1054,41 +1068,55 @@ const checkPropInfo = (info) => { } } } - console.log("newArr33",infos) + console.log("newArr99",infos) newInfo[key].dataInfo = infos; - break; + } } else { // 多种语言组合成一句话 // 文本类型处理 if (newInfo[key].groupType === GroupTypeEnum.TEXT) { + let langSort = newInfo[key].langSort || []; if (langSort.length === 0) { langSort = allLang } let mergeLabel = []; - for (let j = 0; j < langSort.length; j++) { - const labelInfo = [] - for (let k = 0; k < langList.length; k++) { - if (langSort[j] === langList[k].locale && newInfo[key].dataInfo[k].showLabel) { - mergeLabel.push(langList[k].value) + + if(newInfo[key].canInput){ + for (let j = 0; j < dataInfoArr.length; j++) { + if (dataInfoArr[j].showLabel) { + if(mergeLabel.includes(dataInfoArr[j].showLabel)){ + useMessage().notifyWarning(`${newInfo[key].groupName}中,第${j + 1}项重复${dataInfoArr[j].showLabel}`) + } + mergeLabel.push(dataInfoArr[j].showLabel) } } - // 校验重复 - for (let k = 0; k < dataInfoArr.length; k++) { - if (langSort[j] === newInfo[key].dataInfo[k].locale) { - if (newInfo[key].dataInfo[k].showLabel) { - if (labelInfo.includes(newInfo[key].dataInfo[k].showLabel)) { - useMessage().notifyError(`${newInfo[key].groupName}中第${labelInfo.length + 1}项重复`); - that.errorList.push({ - key: `${key}_${k}`, - message: "数据重复" - }) - reject("数据重复") - return + }else { + for (let j = 0; j < langSort.length; j++) { + const labelInfo = [] + for (let k = 0; k < langList.length; k++) { + console.log("newInfo[key].dataInfo[k]",newInfo[key].dataInfo[k]) + if (langSort[j] === langList[k].locale) { + mergeLabel.push(langList[k].value) + } + } + // 校验重复 + for (let k = 0; k < dataInfoArr.length; k++) { + if (langSort[j] === newInfo[key].dataInfo[k].locale) { + if (newInfo[key].dataInfo[k].showLabel) { + if (labelInfo.includes(newInfo[key].dataInfo[k].showLabel)) { + useMessage().notifyError(`${newInfo[key].groupName}中第${labelInfo.length + 1}项重复`); + that.errorList.push({ + key: `${key}_${k}`, + message: "数据重复" + }) + reject("数据重复") + return + } + labelInfo.push(newInfo[key].dataInfo[k].showLabel) } - labelInfo.push(newInfo[key].dataInfo[k].showLabel) } } } @@ -1374,7 +1402,7 @@ defineExpose({ } .error_tip { - box-shadow: rgb(255, 0, 0) 0px 0px 2px 1px; + box-shadow: rgb(255, 0, 0) 0 0 2px 1px; } diff --git a/hangtag-ui/hangtag-ui-admin/src/components/DraftDesign/components/DynamicPropConfig.vue b/hangtag-ui/hangtag-ui-admin/src/components/DraftDesign/components/DynamicPropConfig.vue index 92c5f49..3c7037f 100644 --- a/hangtag-ui/hangtag-ui-admin/src/components/DraftDesign/components/DynamicPropConfig.vue +++ b/hangtag-ui/hangtag-ui-admin/src/components/DraftDesign/components/DynamicPropConfig.vue @@ -49,7 +49,7 @@
- 允许调整数量 diff --git a/hangtag-ui/hangtag-ui-admin/src/components/DraftDesign/index.vue b/hangtag-ui/hangtag-ui-admin/src/components/DraftDesign/index.vue index a7d4e15..8a1ee6c 100644 --- a/hangtag-ui/hangtag-ui-admin/src/components/DraftDesign/index.vue +++ b/hangtag-ui/hangtag-ui-admin/src/components/DraftDesign/index.vue @@ -1462,6 +1462,7 @@ const handlerGroupList = (cells, isCombo = false, min, max) => { canChange = that.pageConfig.propList[i].canChange === true canInput = that.pageConfig.propList[i].canInput === true langSort = that.pageConfig.propList[i].langSort || [] + linkChar = that.pageConfig.propList[i].linkChar || ',' break; } } 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 2268da4..135ddb5 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 @@ -46,7 +46,7 @@
- +
@@ -66,7 +66,7 @@
- + + { for (let i = 0; i < infoList.length; i++) { mapping[infoList[i].label] = infoList[i].langMapping; } + that.propInfo[key].processType = findProcessTypeIndex(index); // 多语言变量替换 const allData = [...that.propInfo[key].dataInfo] const fLang = allData[0].locale; @@ -563,7 +565,7 @@ const findProcessTypeIndex = (index) => { const washingInfoListByType = (type, index = -1) => { const typeIndex = findProcessTypeIndex(index); return that.washingInfoList.filter(item => { - if (item.type === type && (typeIndex < 0 || (item.processType === `${typeIndex}`))) { + if (`${item.type}` === `${type}` && (typeIndex < 0 || (`${item.processType}` === `${typeIndex}`))) { return item } }) @@ -896,18 +898,17 @@ const checkPropInfo = (info) => { for (let i = 0; i < that.propOrderByList.length; i++) { keys.push(that.propOrderByList[i].key); } - - endloop: for (let i = 0; i < keys.length; i++) { + console.log("keys",keys) + for (let i = 0; i < keys.length; i++) { const key = keys[i]; - // 合并相同语言的文字 - let newArr = []; // 每种语言合并成一句话 const allLang = findGroupAllLang(key, newInfo2); - const firstLang = newInfo[key].dataInfo[0].locale; const linkChar = newInfo[key].linkChar || ''; const dataInfoArr = newInfo[key].dataInfo; let langList = newInfo[key].langList || []; + console.log("newInfo[key].groupType",newInfo[key]) if (newInfo[key].groupType === GroupTypeEnum.RATIO) { + // 成分比例 都进行固定语言组合 // 获取到所以的成分 let langSort = newInfo[key].langSort || []; @@ -937,6 +938,8 @@ const checkPropInfo = (info) => { for (let j = 0; j < langSort.length; j++) { const labelInfo = [] let allRatio = 0; // 累计 比例 + const langLabel = []; + let linkChar = "," for (let k = 0; k < langList.length; k++) { if (langSort[j] === langList[k].locale) { let tmpValue = `${langList[k].value}`.replaceAll('${r}', `${str}`) @@ -946,9 +949,17 @@ const checkPropInfo = (info) => { if (str === null || str === undefined || str === -1) { str = '' } - mergeLabel.push(tmpValue) + console.log("langList[k]",langList[k]) + if(langList[k].linkChar && linkChar != ','){ + linkChar = langList[k] + } + langLabel.push(tmpValue) } } + if(langLabel.length > 0){ + mergeLabel.push(langLabel.join(linkChar)) + } + let flag = false; // 校验 for (let k = 0; k < dataInfoArr.length; k++) { @@ -1006,7 +1017,6 @@ const checkPropInfo = (info) => { if (newInfo[kKey].groupName === newInfo[key].parentId) { newKey = kKey; parentStr = newInfo[kKey].dataInfo[0].label + '
' - break; } } @@ -1021,24 +1031,28 @@ const checkPropInfo = (info) => { // 语言对应自己的自动位置 if (newInfo[key].multiLanguage) { + const showLabel1 = newInfo[key].dataInfo[0].showLabel if (newInfo[key].groupType === GroupTypeEnum.ICON) { const infoList = washingInfoListByType(newInfo[key].groupType) const infos = newInfo[key].dataInfo; for (let j = 1; j < infos.length; j++) { + outerLoop: for (let i = 0; i < infoList.length; i++) { const row1 = infoList[i]; - for (let k = 0; k < row1.langMapping.length; k++) { - // 跳过icon 类型,因为没有url - if (infos[j].locale === row1.langMapping[k].locale) { - infos[j].label = row1.langMapping[k].value - break outerLoop; + if(`${row1.processType}` === `${ newInfo[key].processType}`){ + for (let k = 0; k < row1.langMapping.length; k++) { + // 跳过icon 类型,因为没有url + if (infos[j].locale === row1.langMapping[k].locale && showLabel1 === row1.value) { + infos[j].label = row1.langMapping[k].value + break outerLoop; + } } } } } console.log("newArr33",infos) newInfo[key].dataInfo = infos; - break; + }else { const infoList = washingInfoListByType(newInfo[key].groupType) const infos = newInfo[key].dataInfo; @@ -1054,41 +1068,55 @@ const checkPropInfo = (info) => { } } } - console.log("newArr33",infos) + console.log("newArr99",infos) newInfo[key].dataInfo = infos; - break; + } } else { // 多种语言组合成一句话 // 文本类型处理 if (newInfo[key].groupType === GroupTypeEnum.TEXT) { + let langSort = newInfo[key].langSort || []; if (langSort.length === 0) { langSort = allLang } let mergeLabel = []; - for (let j = 0; j < langSort.length; j++) { - const labelInfo = [] - for (let k = 0; k < langList.length; k++) { - if (langSort[j] === langList[k].locale && newInfo[key].dataInfo[k].showLabel) { - mergeLabel.push(langList[k].value) + + if(newInfo[key].canInput){ + for (let j = 0; j < dataInfoArr.length; j++) { + if (dataInfoArr[j].showLabel) { + if(mergeLabel.includes(dataInfoArr[j].showLabel)){ + useMessage().notifyWarning(`${newInfo[key].groupName}中,第${j + 1}项重复${dataInfoArr[j].showLabel}`) + } + mergeLabel.push(dataInfoArr[j].showLabel) } } - // 校验重复 - for (let k = 0; k < dataInfoArr.length; k++) { - if (langSort[j] === newInfo[key].dataInfo[k].locale) { - if (newInfo[key].dataInfo[k].showLabel) { - if (labelInfo.includes(newInfo[key].dataInfo[k].showLabel)) { - useMessage().notifyError(`${newInfo[key].groupName}中第${labelInfo.length + 1}项重复`); - that.errorList.push({ - key: `${key}_${k}`, - message: "数据重复" - }) - reject("数据重复") - return + }else { + for (let j = 0; j < langSort.length; j++) { + const labelInfo = [] + for (let k = 0; k < langList.length; k++) { + console.log("newInfo[key].dataInfo[k]",newInfo[key].dataInfo[k]) + if (langSort[j] === langList[k].locale) { + mergeLabel.push(langList[k].value) + } + } + // 校验重复 + for (let k = 0; k < dataInfoArr.length; k++) { + if (langSort[j] === newInfo[key].dataInfo[k].locale) { + if (newInfo[key].dataInfo[k].showLabel) { + if (labelInfo.includes(newInfo[key].dataInfo[k].showLabel)) { + useMessage().notifyError(`${newInfo[key].groupName}中第${labelInfo.length + 1}项重复`); + that.errorList.push({ + key: `${key}_${k}`, + message: "数据重复" + }) + reject("数据重复") + return + } + labelInfo.push(newInfo[key].dataInfo[k].showLabel) } - labelInfo.push(newInfo[key].dataInfo[k].showLabel) } } } @@ -1374,7 +1402,7 @@ defineExpose({ } .error_tip { - box-shadow: rgb(255, 0, 0) 0px 0px 2px 1px; + box-shadow: rgb(255, 0, 0) 0 0 2px 1px; } diff --git a/hangtag-ui/hangtag-ui-front/src/components/DraftDesign/components/DynamicPropConfig.vue b/hangtag-ui/hangtag-ui-front/src/components/DraftDesign/components/DynamicPropConfig.vue index 92c5f49..3c7037f 100644 --- a/hangtag-ui/hangtag-ui-front/src/components/DraftDesign/components/DynamicPropConfig.vue +++ b/hangtag-ui/hangtag-ui-front/src/components/DraftDesign/components/DynamicPropConfig.vue @@ -49,7 +49,7 @@
- 允许调整数量 diff --git a/hangtag-ui/hangtag-ui-front/src/components/DraftDesign/index.vue b/hangtag-ui/hangtag-ui-front/src/components/DraftDesign/index.vue index a7d4e15..8a1ee6c 100644 --- a/hangtag-ui/hangtag-ui-front/src/components/DraftDesign/index.vue +++ b/hangtag-ui/hangtag-ui-front/src/components/DraftDesign/index.vue @@ -1462,6 +1462,7 @@ const handlerGroupList = (cells, isCombo = false, min, max) => { canChange = that.pageConfig.propList[i].canChange === true canInput = that.pageConfig.propList[i].canInput === true langSort = that.pageConfig.propList[i].langSort || [] + linkChar = that.pageConfig.propList[i].linkChar || ',' break; } } diff --git a/sql/mysql/20241202/产品信息新增字段.sql b/sql/mysql/20241202/产品信息新增字段.sql index 0e43866..69ac3ee 100644 --- a/sql/mysql/20241202/产品信息新增字段.sql +++ b/sql/mysql/20241202/产品信息新增字段.sql @@ -12,3 +12,7 @@ ALTER TABLE oms_product_info ALTER TABLE oms_product_info ADD COLUMN `price_list` text DEFAULT NULL COMMENT 'json数组数据 [{p:100.25,c:"RMB",d:true}]'; + +-- 销售订单商品的币种 +ALTER TABLE oms_saleorder_entry + ADD COLUMN `currency` varchar(64) DEFAULT NULL COMMENT '币种 字典 currency_type' AFTER `price`; \ No newline at end of file