Commit 51983e3c by Jaxon

feat(商品上架): 完善商品确认组件的数据流与交互

- 移除未使用的 API 导入
- 在商品/套餐组件中透传 merchantIdList,用于获取运营成本
- 修改 formItemMixin 的 saveEdit 方法,支持跳过验证
- 将商品/套餐组件的 v-show 改为 v-if,避免隐藏组件状态残留
- 在商品选择弹窗中增加运营成本字段和适用区域显示
- 修复套餐商品验证时引用错误的问题
- 商品详情组件支持更新运营成本数据
- 调整商品详情展示 schema,显示运营成本并隐藏部分字段
1 parent 4c705e0e
......@@ -63,8 +63,10 @@ export default {
this.editState = VIEW_MODE.EDIT;
},
async saveEdit() {
await this.validate();
async saveEdit({ useValidate = true } = {}) {
if (useValidate) {
await this.validate();
}
if (this.editState !== VIEW_MODE.EDIT)
return;
this.editState = VIEW_MODE.SAVING;
......@@ -127,7 +129,6 @@ export default {
},
mounted() {
console.log("this", this);
this._register();
},
......
<template>
<div class="detail-wrapper">
<Descriptions :data="packageData" :schema="packagesSchema" />
<Descriptions :data="packages" :schema="packagesSchema" />
<el-divider class="divider"></el-divider>
<div v-for="productData in productList"
<div v-for="(productData, index) in productList"
:key="productData.id"
class="product-detail-wrapper">
<Product :product="productData"
......@@ -12,8 +12,10 @@
:show-sales-proportion-percent="false"
:show-settlement-type="false"
:show-gift-cost="false"
:merchant-id-list="merchantIdList"
:show-penetration-rate="false"
use-parent-mode />
use-parent-mode
@update:upgradeGoods="handleUpdateProduct($event, index)" />
<el-divider class="divider"></el-divider>
</div>
</div>
......@@ -32,6 +34,10 @@ export default {
Product,
},
props: {
merchantIdList: {
type: Array,
default: () => [],
},
packages: {
type: Object,
default: () => ({ }),
......@@ -44,31 +50,40 @@ export default {
data() {
return {
VIEW_MODE,
packageData: {},
packagesSchema: [],
};
},
computed: {
productList() {
return this.packageData.detailList.map(item => ({
return this.packages.detailList.map(item => ({
upgradeGoodsId: item.upgradeGoodsId,
upgradeCommodityCode: item.upgradeCommodityCode,
detailList: [item],
}));
},
},
watch: {
packages: {
handler(val) {
this.$set(this, "packageData", cloneDeep(val));
},
immediate: true,
deep: true,
},
},
async mounted() {
this.packagesSchema = await getPackagesDetailDescriptionSchema();
},
methods: {
handleUpdateProduct(upgradeGoods, productListIndex) {
const packages = cloneDeep(this.packages);
const current = packages.detailList?.[productListIndex];
if (!current) {
return;
}
if (!upgradeGoods.positionList) {
upgradeGoods.positionList = [];
}
packages.detailList[productListIndex] = {
...current,
upgradeGoods,
upgradeCommodityCode: upgradeGoods.commodityCode,
upgradeGoodsId: upgradeGoods.id,
upgradeGoodsName: upgradeGoods.upgradeGoodsName,
};
this.$emit("update:packages", packages);
},
},
};
</script>
......
......@@ -142,8 +142,8 @@
<el-divider class="divider" />
<div v-if="productList && productList.length">
<div v-for="(goodsForm, index) in productList"
:key="goodsForm.id">
<Product :ref="`productForm${goodsForm.upgradeGoodsId}`"
:key="goodsForm.upgradeCommodityCode">
<Product :ref="goodsForm.upgradeCommodityCode"
:product.sync="goodsForm"
:edit-state="VIEW_MODE.EDIT"
:disabled-ids="packageSelectedGoodsIds"
......@@ -151,6 +151,7 @@
:show-gift-cost="false"
:show-sales-proportion-percent="false"
:show-settlement-type="false"
:merchant-id-list="merchantIdList"
use-remove-btn
@update:upgradeGoods="handleUpdateProduct($event, index)"
@remove="handleRemoveProduct(goodsForm.id, index)" />
......@@ -177,6 +178,10 @@ export default {
Product,
},
props: {
merchantIdList: {
type: Array,
required: true,
},
baseSceneCode: {
type: String,
required: true,
......@@ -217,6 +222,7 @@ export default {
productList() {
return this.packageForm.detailList.map(item => ({
upgradeGoodsId: item.upgradeGoodsId,
upgradeCommodityCode: item.upgradeCommodityCode,
detailList: [item],
}));
},
......@@ -259,7 +265,6 @@ export default {
isSolarFilm,
handleUpdateProduct(upgradeGoods, productListIndex) {
console.log("upgradeGoods", upgradeGoods);
if (this.packageForm.detailList[productListIndex]) {
if (!upgradeGoods.positionList) {
upgradeGoods.positionList = [];
......@@ -330,15 +335,11 @@ export default {
});
throw new Error("套餐的商品不能为空");
}
for (const goods of this.packageForm.detailList) {
const refs = this.$refs[`productForm${goods.upgradeGoodsId}`];
await this.$nextTick();
for (const goods of this.productList) {
const refs = this.$refs[goods.upgradeCommodityCode];
const ref = Array.isArray(refs) ? refs[0] : refs;
console.log("ref", ref);
if (!refs || !isFunction(ref?.validate)) {
console.log("不存在或者不是函数?", ref, ref.validate);
continue;
}
await ref.validate();
}
return {
......
<template>
<div class="content">
<div class="tabs-wrapper">
<Detail v-show="editState === VIEW_MODE.VIEW"
<Detail v-if="editState === VIEW_MODE.VIEW"
v-bind="$attrs"
:edit-state="editState"
v-on="$listeners" />
<Modify v-show="editState === VIEW_MODE.EDIT"
<Modify v-if="editState === VIEW_MODE.EDIT || editState === VIEW_MODE.SAVING"
ref="modifyRef"
v-bind="$attrs"
:edit-state="editState"
......@@ -45,6 +45,7 @@ export default {
// 尚未初始化
return;
}
console.log("combo index validate");
return await modifyRef.validate();
},
},
......
......@@ -20,6 +20,10 @@ export default {
Descriptions,
},
props: {
merchantIdList: {
type: Array,
required: true,
},
product: {
type: Object,
required: true,
......
......@@ -35,8 +35,7 @@
:rules="[{ required: true, message: '请选择上架部位', trigger: 'change' }]">
<el-radio-group v-model="product.detailList[0].position">
<template v-for="item in options.position">
<el-radio v-if="showPositionItem(item.position)"
:key="item.position"
<el-radio :key="item.position"
:label="item.position">
{{ item.confName }}
</el-radio>
......@@ -205,6 +204,7 @@
<SelectGoodsDialog v-if="dialog.selectGoods.show"
:show.sync="dialog.selectGoods.show"
:base-scene-code="baseSceneCode"
:merchant-id-list="merchantIdList"
:expand-ids="disabledIds"
:active-id="product.detailList[0].upgradeCommodityCode"
@confirm="handleSelectGoodsConfirm" />
......@@ -236,7 +236,10 @@ export default {
type: String,
required: true,
},
merchantIdList: {
type: Array,
required: true,
},
// 当套餐加载这个组件的时候 不需要结算方式
showSettlementType: {
type: Boolean,
......@@ -312,7 +315,6 @@ export default {
this.$emit("remove");
},
async initOptions() {
console.log("product init", BaseData.positionTypeList);
this.options.position = await this.get(BaseData.positionTypeList);
},
......@@ -327,7 +329,6 @@ export default {
handleSelectGoodsConfirm(upgradeGoods) {
// 库存-sku001
console.log("upgradeGoods", upgradeGoods);
upgradeGoods.djCost = upgradeGoods.djCost ?? 0;
upgradeGoods.positionList = [];
if (upgradeGoods.position) {
......
<template>
<div class="">
<Detail v-show="editState === VIEW_MODE.VIEW"
<Detail v-if="editState === VIEW_MODE.VIEW"
v-bind="$attrs"
:merchant-id-list="merchantIdList"
:product="product"
v-on="$listeners" />
<Modify v-show="editState === VIEW_MODE.EDIT"
<Modify v-if="editState === VIEW_MODE.EDIT || editState === VIEW_MODE.SAVING"
v-bind="$attrs"
ref="modifyRef"
:merchant-id-list="merchantIdList"
:product="product"
v-on="$listeners" />
</div>
</template>
<script>
import { getOperationCost } from "@/api/grounding";
import { VIEW_MODE } from "@/views/goods/shelfProduct/constant/index";
import Detail from "./components/detail/index.vue";
import Modify from "./components/modify/index.vue";
......@@ -22,6 +27,14 @@ export default {
},
inheritAttrs: false,
props: {
merchantIdList: {
type: Array,
required: true,
},
product: {
type: Object,
default: () => ({}),
},
editState: {
type: String,
required: true,
......@@ -33,12 +46,37 @@ export default {
};
},
computed: {
},
watch: {
},
async mounted() {
await this.init();
},
methods: {
async init() {
console.log("123");
const _operationCost = this.product?.detailList?.[0]?.upgradeGoods?.operationCost;
if (_operationCost) {
return;
}
const commodityCode = this.product?.detailList?.[0]?.upgradeGoods?.commodityCode;
if (!commodityCode) {
return;
}
const { operationCost } = await getOperationCost({
commodityCode,
merchantIdList: this.merchantIdList,
});
// 创建新对象
const upgradeGoods = structuredClone(this.product.detailList[0].upgradeGoods);
this.$emit("update:upgradeGoods", {
...upgradeGoods,
operationCost,
});
},
// product.detailList[0].upgradeGoods.commodityCode
async validate() {
console.log("进得来?");
const modifyRef = this.$refs.modifyRef;
if (!modifyRef) {
// 尚未初始化
......
<template>
<VenusDialog v-model="showDialog"
title="选择商品"
title="选择产品"
width="70%"
height="700px"
draggable
destroy-on-close
:close-on-click-modal="false"
......@@ -65,12 +66,29 @@
</el-button>
</div>
<d2-table ref="tableRef"
class="table-wrapper"
:before-search-fn="beforeSearchFn"
:get-list-api="table.api"
:has-num="false"
:search-form="table.form"
:table-params="table.props"
@setTableFinishFun="setTableFinishFun">
<template #upgradeGoodsAreaList="{ scope }">
<el-tooltip v-if="Array.isArray(scope.upgradeGoodsAreaList) && scope.upgradeGoodsAreaList.length" placement="top">
<template #content>
<div class="car-type-list">
<div v-for="(item, index) in scope.upgradeGoodsAreaList" :key="index">
{{ item.provinceName === '全国' ? '全国' : `${item.provinceName}-${item.cityName}` }}
</div>
</div>
</template>
<div class="text-hide" v-text="getUpgradeGoodsAreaList(scope.upgradeGoodsAreaList)">
</div>
</el-tooltip>
<div v-else>
-
</div>
</template>
<template #single-button="scope">
<el-radio v-model="selectedId"
:disabled="getExpandIds.includes(scope.scope.commodityCode)"
......@@ -111,6 +129,8 @@
<script>
import { getAllCategory } from "@api/product";
import { getUpgradeProductList } from "@api/productManage";
import { isArray } from "lodash-es";
import { getOperationCost } from "@/api/grounding";
import VenusDialog from "@/components/venusDialog/index.vue";
import { setAllOptions } from "@/libs/select";
import { baseConfig } from "@/main";
......@@ -138,6 +158,11 @@ export default {
type: Array,
default: () => ([]),
},
// 服务商列表
merchantIdList: {
type: Array,
default: () => ([]),
},
// 业务场景
baseSceneCode: {
type: String,
......@@ -211,6 +236,22 @@ export default {
},
methods: {
formatCar,
getUpgradeGoodsAreaList(areaList) {
if (!isArray(areaList)) {
return "-";
}
if (areaList.length === 0) {
return "-";
}
const _areaList = areaList.map((item) => {
if (item.provinceName === "全国") {
return item.provinceName;
}
return `${item.provinceName}-${item.cityName}`;
});
return _areaList.join(",");
},
handleSelectedRow(row) {
this.$set(this, "selectedRow", row);
this.selectedId = row.commodityCode;
......@@ -254,12 +295,20 @@ export default {
// 会员权益 goodsTypeList
const searchKey = isQualityUpgrade(this.baseSceneCode) ? "excludeGoodsTypeList" : "goodsTypeList";
this.table.form[searchKey] = filterParams;
this.table.form.merchantIds = this.merchantIdList;
},
handleSelectGoodsConfirm() {
async handleSelectGoodsConfirm() {
if (!this.selectedId) {
return this.$message.warning("请选择商品");
}
this.$emit("confirm", this.selectedRow);
const { operationCost } = await getOperationCost({
commodityCode: this.selectedRow.commodityCode,
merchantIdList: this.merchantIdList,
});
this.$emit("confirm", {
...this.selectedRow,
operationCost,
});
},
handleReset() {
this.table.form = {
......@@ -291,4 +340,9 @@ export default {
padding: 0;
}
}
.table-wrapper {
::v-deep .el-table .cell {
padding: 6px 8px;
}
}
</style>
......@@ -74,18 +74,19 @@
<el-button style="width:160px"
type="primary"
size="small"
@click="saveEdit()">
@click="saveEdit({ useValidate: false })">
保存
</el-button>
</div>
</div>
<div class="tabs-wrapper">
<div v-if="hasMerchantIdList" class="tabs-wrapper">
<Product v-if="productDetail.productType === 1"
ref="productRefs"
:key="tabsActive"
:edit-state="editState"
:merchant-id-list="merchantIdList"
:base-scene-code="baseSceneCode"
:product="productDetail || { detailList: [] }"
@update:upgradeGoods="handleProductUpdateUpgradeGoods" />
......@@ -93,10 +94,12 @@
ref="packageRefs"
:key="tabsActive"
:prefix="$data._prefix"
:merchant-id-list="merchantIdList"
:edit-state="editState"
:base-scene-code="baseSceneCode"
:shelf-type="shelfType"
:packages="productDetail || { detailList: [] }" />
:packages="productDetail || { detailList: [] }"
@update:packages="handleComboUpdatePackages" />
</div>
</template>
......@@ -115,6 +118,7 @@ import {
delProductPackagesApi,
getProductPackagesDetailApi,
getProductPackagesListApi,
getShelfProductBaseInfoApi,
postProductPackagesApi,
} from "@/views/goods/shelfProduct/api/index.js";
import { VIEW_MODE } from "@/views/goods/shelfProduct/constant/index.js";
......@@ -163,6 +167,9 @@ export default {
list: [],
},
productDetail: { },
// 这是来自整个订单的, 跟detail无关,不能放detail里
merchantIdList: [],
hasMerchantIdList: false,
};
},
computed: {
......@@ -175,8 +182,7 @@ export default {
},
},
},
mounted() {
async mounted() {
},
methods: {
isEmpty,
......@@ -280,29 +286,30 @@ export default {
return;
}
const newRow = list[0];
if (isCreate) {
// 新增
this.tabs.list.unshift(newRow);
const index = this.tabs.list.findIndex(item => item.id === this.tabsActive);
this.tabs.list.splice(index, 1);
this.tabs.active = newRow.id;
// id 由临时 nanoid- 改为正式id 所以要多做一些步骤
// tabs list 先 push 接口返回的 存储好的id
} else {
console.log("new row", newRow);
// 有值 为 修改
const index = this.tabs.list.findIndex(item => item.id === req.id);
if (index === -1) {
return;
}
this.$set(this.tabs.list, index, newRow);
} else {
// 空值 为 新增
// id 由临时 nanoid- 改为正式id 所以要多做一些步骤
// tabs list 先 push 接口返回的 存储好的id
this.tabs.list.unshift(newRow);
// 删掉新增时 临时存的
const index = this.tabs.list.findIndex(item => item.id === this.tabsActive);
this.tabs.list.splice(index, 1);
this.tabs.active = newRow.id;
// 通过现有 nanoid 找到对应index 删掉
// 设置 active值
}
this.$refs.remoteSelectRef.forceUpdate();
// // 根据id 修改 productName
// await this.$refs.remoteSelectRef.getApi(false);
this.$set(this, "productDetail", newDetail);
this.productDetail = newDetail;
if (useMessage) {
this.$message({
......@@ -380,6 +387,12 @@ export default {
// 获取头部的select选择项
async getTitleOptions({ pageQuery, isImmediate }) {
if (!this.hasMerchantIdList) {
const { merchantIdList } = await getShelfProductBaseInfoApi({ businessCode: this.businessCode });
this.merchantIdList = merchantIdList || [];
await this.$nextTick();
}
const { list, pages } = await getProductPackagesListApi({
businessCode: this.businessCode,
productName: pageQuery.searchValue,
......@@ -394,6 +407,7 @@ export default {
}
}
pageQuery.pages = pages;
this.hasMerchantIdList = true;
return {
list: list.map(item => ({
...item,
......@@ -414,6 +428,9 @@ export default {
});
this.$set(this.productDetail, "upgradeGoodsId", upgradeGoods.id);
},
handleComboUpdatePackages(packages) {
this.$set(this, "productDetail", packages);
},
// 新增按钮
async handleAppendProductPackages(command) {
......
import { get } from "lodash-es";
import { get, isArray } from "lodash-es";
import { nanoid } from "nanoid";
import { BaseData, settlementTypeOpt } from "@/common/constants";
import { isZeroOrNumber } from "@/libs/number";
......@@ -226,7 +226,7 @@ export async function getProductDetailUpgradeGoodsDescriptionSchema() {
positionOption = await store.dispatch("d2admin/base/get", BaseData.positionTypeList);
}
return [
{ name: "detailList.0.upgradeGoods.upgradeGoodsName", label: "商品名称", col: 8 },
{ name: "detailList.0.upgradeGoods.upgradeGoodsName", label: "产品名称", col: 8 },
{
name: "detailList.0.upgradeGoods.specificationData",
label: "规格",
......@@ -240,7 +240,7 @@ export async function getProductDetailUpgradeGoodsDescriptionSchema() {
},
{
name: "detailList.0.upgradeGoods.type",
label: "商品编码",
label: "产品编码",
col: 8,
render(h, { data, schemaItem }) {
const value = get(data, schemaItem.name);
......@@ -252,7 +252,7 @@ export async function getProductDetailUpgradeGoodsDescriptionSchema() {
},
{
name: "detailList.0.upgradeGoods.thirdPartyCode",
label: "第三方编码",
label: "供应商编码",
col: 8,
render(h, { data, schemaItem }) {
const value = get(data, schemaItem.name);
......@@ -262,18 +262,18 @@ export async function getProductDetailUpgradeGoodsDescriptionSchema() {
);
},
},
{
name: "detailList.0.upgradeGoods.purchasePrice",
label: "采购价/卷",
col: 8,
render(h, { data, schemaItem }) {
const value = isZeroOrNumber(get(data, schemaItem.name));
return h(
"span",
value === "-" ? value : `${value}元`,
);
},
},
// {
// name: "detailList.0.upgradeGoods.purchasePrice",
// label: "采购价/卷",
// col: 8,
// render(h, { data, schemaItem }) {
// const value = isZeroOrNumber(get(data, schemaItem.name));
// return h(
// "span",
// value === "-" ? value : `${value}元`,
// );
// },
// },
{
name: "detailList.0.upgradeGoods.upgradePrice",
label: "参考售价/件",
......@@ -339,7 +339,7 @@ export async function getProductDetailUpgradeGoodsDescriptionSchema() {
);
},
},
{ name: "detailList.0.upgradeGoods.commodityCode", label: "商品ID", col: 8 },
{ name: "detailList.0.upgradeGoods.commodityCode", label: "产品ID", col: 8 },
{
name: "detailList.0.upgradeGoods.djCost",
label: "嘀加成本/件",
......@@ -352,13 +352,12 @@ export async function getProductDetailUpgradeGoodsDescriptionSchema() {
);
},
isHide: ({ formModel }) => {
return false;
// const goodsInfo = formModel?.goodsInfo || formModel.upgradeGoods?.goodsInfo;
// const supplierCode = formModel?.supplierCode || formModel?.upgradeGoods?.supplierCode || goodsInfo?.supplierCode;
// const hasEquityScene = baseConfig.equitySceneType.includes(formModel.goodsType);
// const hasExtendPosition = baseConfig.extendedPosiType.includes(formModel.goodsType);
// const hasSupplierCode = baseConfig.supplierCode.includes(supplierCode);
// return !((hasEquityScene || hasExtendPosition) && !hasSupplierCode);
const goodsInfo = formModel?.goodsInfo || formModel.upgradeGoods?.goodsInfo;
const supplierCode = formModel?.supplierCode || formModel?.upgradeGoods?.supplierCode || goodsInfo?.supplierCode;
const hasEquityScene = baseConfig.equitySceneType.includes(formModel.goodsType);
const hasExtendPosition = baseConfig.extendedPosiType.includes(formModel.goodsType);
const hasSupplierCode = baseConfig.supplierCode.includes(supplierCode);
return !((hasEquityScene || hasExtendPosition) && !hasSupplierCode);
},
},
{
......@@ -381,9 +380,9 @@ export async function getProductDetailUpgradeGoodsDescriptionSchema() {
const names = positions.map(item => item.confName);
return result(names?.join("/"));
},
// isHide: ({ formModel }) => {
// return formModel.goodsType !== 1;
// },
isHide: ({ formModel }) => {
return formModel?.detailList?.[0]?.goodsType !== 1;
},
},
{
name: "detailList.0.upgradeGoods.upgradeGoodsServiceItemsList",
......@@ -409,14 +408,6 @@ export async function getProductDetailUpgradeGoodsDescriptionSchema() {
value,
);
},
// isHide: ({ formModel }) => {
// const upgradeGoods = get(formModel, "detailList.0.upgradeGoods");
// const hasEquityScene = baseConfig.equitySceneType.includes(upgradeGoods?.goodsType);
// const hasSupplierCode = baseConfig.supplierCode.includes(upgradeGoods?.goodsInfo.supplierCode);
// // 这里是hide 所以要反一下
// return !(hasEquityScene && !hasSupplierCode);
// },
},
{
name: "detailList.0.upgradeGoods.entityCardFlag",
......@@ -429,13 +420,6 @@ export async function getProductDetailUpgradeGoodsDescriptionSchema() {
value === "Y" ? "是" : "否",
);
},
// isHide: ({ formModel }) => {
// const upgradeGoods = get(formModel, "detailList.0.upgradeGoods");
// const hasEquityScene = baseConfig.equitySceneType.includes(upgradeGoods?.goodsType);
// // 这里是hide 所以要反一下
// return !(hasEquityScene);
// },
},
{
name: "detailList.0.upgradeGoods.warrantyPeriod",
......@@ -448,12 +432,18 @@ export async function getProductDetailUpgradeGoodsDescriptionSchema() {
value === "-" ? value : `${value}年`,
);
},
// isHide: ({ formModel }) => {
// const upgradeGoods = get(formModel, "detailList.0.upgradeGoods");
// const hasMembraneType = baseConfig.membraneTypeList.includes(upgradeGoods?.goodsType);
// // 这里是hide 所以要反一下
// return !(hasMembraneType);
// },
},
{
name: "detailList.0.upgradeGoods.operationCost",
label: "运营成本/元",
col: 8,
render(h, { data, schemaItem }) {
const value = isZeroOrNumber(get(data, schemaItem.name));
return h(
"span",
value === "-" ? value : `${value}元`,
);
},
},
];
}
......@@ -567,7 +557,7 @@ export const selectGoodsTableSchema = {
width: "60",
},
{
label: "商品名称",
label: "产品名称",
prop: "upgradeGoodsName",
width: 150,
formatter: (cellValue) => {
......@@ -575,7 +565,7 @@ export const selectGoodsTableSchema = {
},
},
{
label: "商品ID",
label: "产品ID",
prop: "commodityCode",
width: 180,
formatter: (cellValue) => {
......@@ -590,14 +580,14 @@ export const selectGoodsTableSchema = {
},
},
{
label: "商品编码",
label: "产品编码",
prop: "type",
formatter: (cellValue) => {
return cellValue.type || "-";
},
},
{
label: "第三方编码",
label: "供应商编码",
prop: "thirdPartyCode",
width: 100,
formatter: (cellValue) => {
......@@ -605,13 +595,43 @@ export const selectGoodsTableSchema = {
},
},
{
label: "运营成本/元",
prop: "operationCost",
width: 100,
formatter: (row) => {
const value = isZeroOrNumber(row.operationCost);
return value === "-" ? value : `${value}元`;
},
},
{
label: "适用区域",
prop: "upgradeGoodsAreaList",
width: 180,
addHtml: "upgradeGoodsAreaList",
// formatter: (row) => {
// if (!isArray(row.upgradeGoodsAreaList)) {
// return "-";
// }
// if (row.upgradeGoodsAreaList.length === 0) {
// return "-";
// }
// const areaList = row.upgradeGoodsAreaList.map((item) => {
// if (item.provinceName === "全国") {
// return item.provinceName;
// }
// return `${item.provinceName}-${item.cityName}`;
// });
// return areaList.join("/");
// },
},
{
label: "适用车型",
prop: "",
addHtml: "carName",
width: 200,
// formatter: (cellValue) => {
// return cellValue?.carTypeConfigList?.length ? cellValue.carTypeConfigList.map(item => item.seriesName).join('/') : '-'
// }
formatter: (cellValue) => {
return cellValue?.carTypeConfigList?.length ? cellValue.carTypeConfigList.map(item => item.seriesName).join("/") : "-";
},
},
{
label: "所属系列",
......@@ -644,7 +664,7 @@ export const selectGoodsTableSchema = {
export function getSelectGoodsTableFilterSchema(keyDownGetList) {
return [
{
label: "商品名称",
label: "产品名称",
name: "upgradeGoodsName",
type: "input",
maxlength: 50,
......@@ -652,7 +672,7 @@ export function getSelectGoodsTableFilterSchema(keyDownGetList) {
keyFn: keyDownGetList,
},
{
label: "商品ID",
label: "产品ID",
name: "commodityCode",
addHtml: "commodityCode",
},
......@@ -665,12 +685,12 @@ export function getSelectGoodsTableFilterSchema(keyDownGetList) {
keyFn: keyDownGetList,
},
{
label: "商品编码",
label: "产品编码",
name: "type",
addHtml: "type",
},
{
label: "第三方编码",
label: "供应商编码",
name: "thirdPartyCode",
addHtml: "thirdPartyCode",
},
......
......@@ -110,7 +110,6 @@ import { readFileAsDataURL } from "@/libs/file";
import { startPolling } from "@/libs/interval";
import { syncTime } from "@/libs/sleep";
import {
getShelfProductBaseInfoApi,
getShelfProductBaseInfoByUUIDApi,
getShelfProductUpdateStep,
postPollFileParseStatusApi,
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!