调整
This commit is contained in:
@@ -18,8 +18,9 @@ export function transform(leftData) {
|
||||
rightData.materialMultiLanguages = leftData.productLocalExtAttr.materialMultiLanguages;
|
||||
rightData.productI18nReqs = leftData.productI18nList;
|
||||
rightData.productPropertyReqs = [];
|
||||
let flag = false
|
||||
for (let i = 0; i < leftData.productPropertyList.length; i++) {
|
||||
rightData.productPropertyReqs.push({
|
||||
let val = {
|
||||
valueUnit: leftData.productPropertyList[i].valueUnit,
|
||||
propValue: leftData.productPropertyList[i].propValue,
|
||||
propName: leftData.productPropertyList[i].propName,
|
||||
@@ -29,9 +30,31 @@ export function transform(leftData) {
|
||||
pid: leftData.productPropertyList[i].pid,
|
||||
templatePid: leftData.productPropertyList[i].templatePid,
|
||||
valueExtendInfo: leftData.productPropertyList[i].valueExtendInfo
|
||||
});
|
||||
}
|
||||
/*if (leftData.productPropertyList[i].vid == 41500) {
|
||||
if (config.brandId) {
|
||||
flag = true
|
||||
val.pid = 41500
|
||||
val.propName = config.brandName
|
||||
}
|
||||
}*/
|
||||
rightData.productPropertyReqs.push(val);
|
||||
}
|
||||
|
||||
/*if (config.brandId && !flag) {
|
||||
rightData.productPropertyReqs.push({
|
||||
"valueUnit": "",
|
||||
"propValue": config.brandName,
|
||||
"propName": "品牌名",
|
||||
"refPid": 1960,
|
||||
"vid": 41500,
|
||||
"controlType": 1,
|
||||
"pid": config.brandId,
|
||||
"templatePid": 1151553,
|
||||
"valueExtendInfo": ""
|
||||
})
|
||||
}*/
|
||||
|
||||
// SKC
|
||||
let rightSkc = [];
|
||||
let leftSkc = leftData.productSkcList;
|
||||
@@ -159,6 +182,7 @@ export function transformSubmitForHalf(leftData, config, draftId) {
|
||||
rightData.materialMultiLanguages = leftData.productLocalExtAttr.materialMultiLanguages;
|
||||
rightData.productI18nReqs = leftData.productI18nList;
|
||||
rightData.productPropertyReqs = [];
|
||||
if (!leftData.productPropertyList) return rightData
|
||||
for (let i = 0; i < leftData.productPropertyList.length; i++) {
|
||||
rightData.productPropertyReqs.push({
|
||||
valueUnit: leftData.productPropertyList[i].valueUnit,
|
||||
@@ -240,6 +264,7 @@ export function transformSubmitForHalf(leftData, config, draftId) {
|
||||
}
|
||||
rightSkuItem.productSkuStockQuantityReq = productSkuStockQuantityReq
|
||||
rightSkuItem.currencyType = leftSkuItem.currencyType;
|
||||
rightSkuItem.supplierPrice = leftSkuItem.supplierPrice + config.upMoney * 100;
|
||||
|
||||
rightSkcItem.productSkuReqs.push(rightSkuItem);
|
||||
}
|
||||
@@ -255,6 +280,14 @@ export function transformSubmitForHalf(leftData, config, draftId) {
|
||||
rightData.carouselImageI18nReqs = leftData.carouselImageI18nVOList;
|
||||
rightData.materialImgUrl = leftData.materialImgUrl;
|
||||
rightData.goodsLayerDecorationReqs = leftData.goodsLayerDecorationVOList;
|
||||
rightData.goodsLayerDecorationReqs.map(item => {
|
||||
if (item.type == 'image') {
|
||||
item.contentList.map(item1 => {
|
||||
delete item1.text
|
||||
delete item1.textModuleDetails
|
||||
})
|
||||
}
|
||||
})
|
||||
rightData.sizeTemplateIds = !leftData.sizeTemplateIds ? []: leftData.sizeTemplateIds;
|
||||
rightData.showSizeTemplateIds = !leftData.showSizeTemplateIds ? []: leftData.showSizeTemplateIds;
|
||||
rightData.goodsModelReqs = !leftData.goodsModelList ? []: leftData.goodsModelList;
|
||||
|
||||
Reference in New Issue
Block a user