Commit a103ef5a by wangzhihui

fixed

1 parent 7ad751ef
This diff could not be displayed because it is too large.
......@@ -40,6 +40,11 @@ export function shouldShowServiceItem(goodsType) {
return SERVICE_ITEM_GOODS_TYPES.includes(Number(goodsType));
}
/** 太阳膜、改色膜、车衣 — 需展示上架部位 */
export function shouldShowPosition(goodsType) {
return shouldShowServiceItem(goodsType);
}
/** 自营延保/权益不展示商品成本带入方式 */
export function shouldShowProductCostType(goodsType, supplierCode) {
return !!goodsType && !isSelfOperatedEquityExtended(goodsType, supplierCode);
......
......@@ -444,6 +444,10 @@ export default {
if (res.warrantyType === null || res.warrantyType === undefined || res.warrantyType === "") {
res.warrantyType = 0;
}
// 自营延保/权益:编辑回显时 productCostType 固定为 1
if (isSelfOperatedEquityExtended(res.goodsType, res.supplierCode)) {
res.productCostType = 1;
}
res.upgradeGoods = {
...res?.upgradeGoods,
goodsName: res.goodsInfo.goodsName,
......@@ -533,9 +537,9 @@ export default {
if (params.tempValidDate) {
delete params.tempValidDate;
}
// 自营延保/权益不传商品成本带入方式,沿用旧规则
// 自营延保/权益:沿用旧规则填嘀加成本,提交时 productCostType 固定传 1
if (isSelfOperatedEquityExtended(data.goodsType, data.supplierCode)) {
delete params.productCostType;
params.productCostType = 1;
}
if (data?.goodsType == 1 && !this.filterBaseSceneCodeBySceneType(1)?.includes(data?.baseSceneCode)) {
return this.$message.warning("太阳膜类产品仅支持上架至精品升级场景");
......
This diff could not be displayed because it is too large.
......@@ -300,9 +300,16 @@ export default {
djCost: val?.djCost, // 嘀加成本
thirdPartyCost: val?.thirdPartyCost, // 第三方成本
serviceItemId: val?.serviceItemId ?? "", // 服务项目
productCostType: val?.productCostType === 0 || val?.productCostType === 1 || val?.productCostType === "0" || val?.productCostType === "1"
? Number(val.productCostType)
: "", // 商品成本带入方式
productCostType: (() => {
const supplierCode = val?.goodsInfo?.supplierCode;
// 自营延保/权益:编辑回显时 productCostType 固定为 1
if (isSelfOperatedEquityExtended(val?.goodsType, supplierCode)) {
return 1;
}
return val?.productCostType === 0 || val?.productCostType === 1 || val?.productCostType === "0" || val?.productCostType === "1"
? Number(val.productCostType)
: "";
})(), // 商品成本带入方式
supplierCode: val?.goodsInfo?.supplierCode, // 供应方
upgradeGoods: {
...val?.upgradeGoods,
......@@ -426,9 +433,9 @@ export default {
? Number(val.productCostType)
: undefined, // 0-自定义成本 1-默认带入产品成本
};
// 自营延保/权益不传商品成本带入方式,沿用旧规则
// 自营延保/权益:沿用旧规则填嘀加成本,提交时 productCostType 固定传 1
if (isSelfOperatedEquityExtended(val?.goodsType, val?.supplierCode)) {
delete item.productCostType;
item.productCostType = 1;
}
merchantGoodsInfoList.push(item);
});
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!