Commit 31f43f7e by wangzhihui

上架管理需求开发

1 parent a103ef5a
......@@ -733,7 +733,7 @@ export default {
{
required: true,
validator: (rule, value, callback) => {
if (!shouldShowPosition(this.formData.goodsType)) {
if (!this.shouldShowPosition(this.formData.goodsType)) {
callback();
return;
}
......@@ -948,6 +948,7 @@ export default {
},
methods: {
shouldShowPosition,
...mapActions({
get: "d2admin/base/get",
}),
......@@ -1199,6 +1200,9 @@ export default {
) {
spliceForm.push("productCostType");
}
if (!shouldShowPosition(formData?.goodsType)) {
spliceForm.push("position");
}
const newForm = shopForm.filter((v) => !spliceForm?.includes(v.name));
this.$set(this.formList[1], "formBlock", newForm);
this.$nextTick(() => {
......@@ -1232,19 +1236,22 @@ export default {
upgradeSupplyModeList
);
}
// 上架部位
}
// 膜类(太阳膜/改色膜/车衣)上架部位选项
if (shouldShowPosition(formData?.goodsType)) {
this.positionTypeList?.forEach((val) => {
val.confId = val.position;
});
this.$set(
this.formList[1].formBlock[
this.formList[1].formBlock.findIndex(
(subItem) => subItem.name == "position"
)
],
"radioGroupList",
this.positionTypeList || []
const positionIndex = this.formList[1].formBlock.findIndex(
(subItem) => subItem.name == "position"
);
if (positionIndex > -1) {
this.$set(
this.formList[1].formBlock[positionIndex],
"radioGroupList",
this.positionTypeList || []
);
}
}
// 当产品信息自带嘀加成本时,将输入框置灰
if (
......
......@@ -409,6 +409,7 @@ export default {
});
});
this.positionTypeList = await this.get(BaseData.positionTypeList);
console.log(this.positionTypeList,'positionTypeList');
},
getDetailInfo(id) {
getMerchantGoodsInfo({ id }).then(async (res) => {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!