Merge branch 'dev' of https://git.yfgame.vip/r/hangtag into dev

This commit is contained in:
wwb 2024-12-14 18:13:38 +08:00
commit a131e441c0
8 changed files with 142 additions and 80 deletions

View File

@ -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 # 商户编号

View File

@ -46,7 +46,7 @@
<div class="flex flex-col">
<div>
<el-form label-width="180px">
<el-form label-width="200px">
<el-form-item label="Style" v-show="that.draftDesignList.length > 1">
<div class="flex ml-3">
<div>
@ -66,7 +66,7 @@
</div>
<div class="w-full" v-if="that.propOrderByList && that.propOrderByList.length > 0">
<el-scrollbar height="600px">
<el-form label-width="180px">
<el-form label-width="200px">
<el-form-item
v-for="(tmp,orderIndex) in that.propOrderByList"
@ -134,8 +134,9 @@
:class="{
'error_tip': errorItem(tmp.key,i)
}" v-if="that.propInfo[tmp.key].canInput">
<el-autocomplete
style="min-width: 200px;width: 60%"
style="min-width: 320px;width: 100%"
v-model="that.propInfo[tmp.key].dataInfo[i].showLabel"
:fetch-suggestions="querySearch"
clearable
@ -500,6 +501,7 @@ const changeIconData = (index: number, key: string) => {
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 + '<br/>'
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;
}
</style>

View File

@ -49,7 +49,7 @@
<el-row>
<el-col :span="6">
<div style="width: 120px;display: flex">
<el-checkbox
<el-checkbox :disabled="disableInput"
v-model="that.configInfo.canChange">
<span>允许调整数量</span>
</el-checkbox>

View File

@ -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;
}
}

View File

@ -46,7 +46,7 @@
<div class="flex flex-col">
<div>
<el-form label-width="180px">
<el-form label-width="200px">
<el-form-item label="Style" v-show="that.draftDesignList.length > 1">
<div class="flex ml-3">
<div>
@ -66,7 +66,7 @@
</div>
<div class="w-full" v-if="that.propOrderByList && that.propOrderByList.length > 0">
<el-scrollbar height="600px">
<el-form label-width="180px">
<el-form label-width="200px">
<el-form-item
v-for="(tmp,orderIndex) in that.propOrderByList"
@ -134,8 +134,9 @@
:class="{
'error_tip': errorItem(tmp.key,i)
}" v-if="that.propInfo[tmp.key].canInput">
<el-autocomplete
style="min-width: 200px;width: 60%"
style="min-width: 320px;width: 100%"
v-model="that.propInfo[tmp.key].dataInfo[i].showLabel"
:fetch-suggestions="querySearch"
clearable
@ -500,6 +501,7 @@ const changeIconData = (index: number, key: string) => {
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 + '<br/>'
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;
}
</style>

View File

@ -49,7 +49,7 @@
<el-row>
<el-col :span="6">
<div style="width: 120px;display: flex">
<el-checkbox
<el-checkbox :disabled="disableInput"
v-model="that.configInfo.canChange">
<span>允许调整数量</span>
</el-checkbox>

View File

@ -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;
}
}

View File

@ -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`;