Commit f0c4d154 by Jaxon

feat: 页面结构调整

1 parent eed6b79d
...@@ -84,7 +84,7 @@ export const routerName = { ...@@ -84,7 +84,7 @@ export const routerName = {
label: "新增产品", label: "新增产品",
category: "Button", category: "Button",
type: "primary", type: "primary",
handle: "handleCatalogAdd" handle: "handleCatalogAdd",
}, },
{ {
authId: "9030711", authId: "9030711",
...@@ -92,7 +92,7 @@ export const routerName = { ...@@ -92,7 +92,7 @@ export const routerName = {
label: "批量上架产品", label: "批量上架产品",
handle: "handleBatchGrounding", handle: "handleBatchGrounding",
category: "Button", category: "Button",
type: "primary" type: "primary",
}, },
{ {
authId: "9030712", authId: "9030712",
...@@ -105,19 +105,19 @@ export const routerName = { ...@@ -105,19 +105,19 @@ export const routerName = {
authId: "9030713", authId: "9030713",
parentId: "90307", parentId: "90307",
label: "上架产品", label: "上架产品",
handle: "handleGrounding" handle: "handleGrounding",
}, },
{ {
authId: "9030714", authId: "9030714",
parentId: "90307", parentId: "90307",
label: "编辑", label: "编辑",
handle: "handleCatalogEdit" handle: "handleCatalogEdit",
}, },
{ {
authId: "9030715", authId: "9030715",
parentId: "90307", parentId: "90307",
label: "删除", label: "删除",
handle: "handleCatalogDelete" handle: "handleCatalogDelete",
}, },
{ {
authId: "9030716", authId: "9030716",
...@@ -125,7 +125,7 @@ export const routerName = { ...@@ -125,7 +125,7 @@ export const routerName = {
label: "批量新增SPU/SKU", label: "批量新增SPU/SKU",
category: "Button", category: "Button",
type: "primary", type: "primary",
handle: "handleBatchCreateSPUOrSKU" handle: "handleBatchCreateSPUOrSKU",
}, },
{ {
authId: "9030717", authId: "9030717",
...@@ -133,7 +133,7 @@ export const routerName = { ...@@ -133,7 +133,7 @@ export const routerName = {
label: "批量新增SKU", label: "批量新增SKU",
category: "Button", category: "Button",
type: "primary", type: "primary",
handle: "handleBatchCreateSKU" handle: "handleBatchCreateSKU",
}, },
{ {
authId: "9030718", authId: "9030718",
...@@ -141,8 +141,8 @@ export const routerName = { ...@@ -141,8 +141,8 @@ export const routerName = {
label: "批量编辑SKU", label: "批量编辑SKU",
category: "Button", category: "Button",
type: "primary", type: "primary",
handle: "handleBatchEditSKU" handle: "handleBatchEditSKU",
} },
], ],
component: _import("goods/productManage/index"), component: _import("goods/productManage/index"),
}, },
...@@ -282,7 +282,7 @@ export const routerName = { ...@@ -282,7 +282,7 @@ export const routerName = {
handle: "handleBatchModifyInventory", handle: "handleBatchModifyInventory",
}, },
], ],
component: _import("goods/grounding/index"), component: _import("goods/grounding/views/table/index"),
}, },
90310: { 90310: {
path: "/editGrounding", path: "/editGrounding",
...@@ -295,7 +295,7 @@ export const routerName = { ...@@ -295,7 +295,7 @@ export const routerName = {
sideHidden: true, sideHidden: true,
activePath: "/grounding", activePath: "/grounding",
}, },
component: _import("goods/grounding/editGrounding"), component: _import("goods/grounding/views/modify/index"),
}, },
90311: { 90311: {
path: "/groundingDetail", path: "/groundingDetail",
...@@ -316,7 +316,7 @@ export const routerName = { ...@@ -316,7 +316,7 @@ export const routerName = {
handle: "handleView", handle: "handleView",
}, },
], ],
component: _import("goods/grounding/groundingDetail"), component: _import("goods/grounding/views/detail/index"),
}, },
90306: { 90306: {
path: "/coupons", path: "/coupons",
......
export const productList = [{ export const productList = [
{
confId: 1, confId: 1,
confName: "基础产品", confName: "基础产品",
}, { },
{
confId: 2, confId: 2,
confName: "升级产品", confName: "升级产品",
}]; },
];
export const baseSupplyModeList = [{ export const baseSupplyModeList = [
{
confId: 1, confId: 1,
confName: "嘀加", confName: "嘀加",
}, { },
{
confId: 2, confId: 2,
confName: "门店", confName: "门店",
}]; },
];
// 太阳膜升级产品供货模式 // 太阳膜升级产品供货模式
export const upgradeSupplyModeList = [{ export const upgradeSupplyModeList = [
{
confId: 1, confId: 1,
confName: "嘀加", confName: "嘀加",
}, { },
{
confId: 3, confId: 3,
confName: "门店套码+嘀加", confName: "门店套码+嘀加",
}, { },
{
confId: 4, confId: 4,
confName: "门店回收原厂+嘀加", confName: "门店回收原厂+嘀加",
}, { },
{
confId: 5, confId: 5,
confName: "服务商自采+嘀加", confName: "服务商自采+嘀加",
}]; },
];
// 1.3场景 升级产品供货模式 // 1.3场景 升级产品供货模式
export const crowdUpgradeSupplyModeList = [{ export const crowdUpgradeSupplyModeList = [
{
confId: 1, confId: 1,
confName: "嘀加", confName: "嘀加",
}, { },
{
confId: 2, confId: 2,
confName: "门店", confName: "门店",
}]; },
];
// 套餐上架产品信息form表单 // 套餐上架产品信息form表单
export const packageGoodsForm = [{ export const packageGoodsForm = [
{
name: "upgradeGoodsId", name: "upgradeGoodsId",
label: "上架产品", label: "上架产品",
isRequired: true, isRequired: true,
...@@ -49,112 +64,137 @@ export const packageGoodsForm = [{ ...@@ -49,112 +64,137 @@ export const packageGoodsForm = [{
optionNameLabel: "confNameValue", optionNameLabel: "confNameValue",
optionTypeNameLabel: "confTypeNameValue", optionTypeNameLabel: "confTypeNameValue",
width: "432px", width: "432px",
}, { },
{
type: "incidBox", type: "incidBox",
key: "goodsType", key: "goodsType",
detailInfo: [{ detailInfo: [
{
label: "产品名称", label: "产品名称",
value: "upgradeGoodsName", value: "upgradeGoodsName",
}, { },
{
label: "规格", label: "规格",
value: "specificationData", value: "specificationData",
}, { },
{
label: "产品编码", label: "产品编码",
value: "type", value: "type",
}, { },
{
label: "供应商编码", label: "供应商编码",
value: "thirdPartyCode", value: "thirdPartyCode",
}, { },
{
label: "参考售价", label: "参考售价",
value: "upgradePrice", value: "upgradePrice",
unit: true, unit: true,
}, { },
{
label: "适用车型", label: "适用车型",
value: "carTypeConfigName", value: "carTypeConfigName",
}, { },
{
label: "所属系列", label: "所属系列",
value: "goodsName", value: "goodsName",
}, { },
{
label: "所属分类", label: "所属分类",
value: "tempGoodsTypeName", value: "tempGoodsTypeName",
}, { },
{
label: "产品ID", label: "产品ID",
value: "upgradeCommodityCode", value: "upgradeCommodityCode",
}, { },
{
label: "运营成本/元", label: "运营成本/元",
value: "operationCost", value: "operationCost",
type: 'price', type: "price",
isPrice: true isPrice: true,
}], },
}, { ],
},
{
name: "position", name: "position",
label: "上架部位", label: "上架部位",
type: "radio-select", type: "radio-select",
radioGroupList: [], radioGroupList: [],
width: "432px" width: "432px",
}, { },
{
name: "goodsAlias", name: "goodsAlias",
label: "商品别名", label: "商品别名",
type: "input", type: "input",
maxlength: 50, maxlength: 50,
width: "432px", width: "432px",
}, { },
{
name: "warrantyType", name: "warrantyType",
label: "质保卡类型", label: "质保卡类型",
type: "select", type: "select",
isClear: false, isClear: false,
optionList: [{ optionList: [
{
confId: 0, confId: 0,
confName: "质保卡", confName: "质保卡",
}, { },
{
confId: 1, confId: 1,
confName: "质保权益卡", confName: "质保权益卡",
}], },
],
optionId: "confId", optionId: "confId",
optionLabel: "confName", optionLabel: "confName",
width: "432px", width: "432px",
}, { },
{
name: "upgradeSupplyMode", name: "upgradeSupplyMode",
label: "升级/产品供货模式", label: "升级/产品供货模式",
type: "radio", type: "radio",
index: 2, index: 2,
radioGroupList: [], radioGroupList: [],
}, { },
{
name: "sellPrice", name: "sellPrice",
label: "售价", label: "售价",
type: "input", type: "input",
width: "432px", width: "432px",
unit: true, unit: true,
handleInput: true, handleInput: true,
}, { },
{
name: "minSellPrice", name: "minSellPrice",
label: "最低售价", label: "最低售价",
type: "input", type: "input",
width: "432px", width: "432px",
unit: true, unit: true,
handleInput: true, handleInput: true,
}, { },
{
name: "upgradeProductCost", name: "upgradeProductCost",
label: "产品、升级成本", label: "产品、升级成本",
type: "input", type: "input",
width: "432px", width: "432px",
unit: true, unit: true,
handleInput: true, handleInput: true,
}, { },
{
name: "recoveryCost", name: "recoveryCost",
label: "回收成本", label: "回收成本",
type: "input", type: "input",
width: "432px", width: "432px",
unit: true, unit: true,
handleInput: true, handleInput: true,
}, { },
{
name: "virtualAccountCost", name: "virtualAccountCost",
label: "虚拟对账成本", label: "虚拟对账成本",
type: "input", type: "input",
width: "432px", width: "432px",
unit: true, unit: true,
handleInput: true, handleInput: true,
}, { },
{
name: "djCost", name: "djCost",
label: "嘀加成本", label: "嘀加成本",
type: "input", type: "input",
...@@ -162,14 +202,16 @@ export const packageGoodsForm = [{ ...@@ -162,14 +202,16 @@ export const packageGoodsForm = [{
unit: true, unit: true,
isDisabled: false, isDisabled: false,
handleInput: true, handleInput: true,
}, { },
{
name: "thirdPartyCost", name: "thirdPartyCost",
label: "第三方成本", label: "第三方成本",
type: "input", type: "input",
width: "432px", width: "432px",
unit: true, unit: true,
handleInput: true, handleInput: true,
}]; },
];
// 套餐查看详情form // 套餐查看详情form
export const packageGoodsDetail = [ export const packageGoodsDetail = [
...@@ -178,39 +220,50 @@ export const packageGoodsDetail = [ ...@@ -178,39 +220,50 @@ export const packageGoodsDetail = [
label: "上架产品", label: "上架产品",
type: "incidBox", type: "incidBox",
key: "goodsType", key: "goodsType",
detailInfo: [{ detailInfo: [
{
label: "产品名称", label: "产品名称",
value: "upgradeGoodsName", value: "upgradeGoodsName",
}, { },
{
label: "规格", label: "规格",
value: "specificationData", value: "specificationData",
}, { },
{
label: "产品编码", label: "产品编码",
value: "type", value: "type",
}, { },
{
label: "供应商编码", label: "供应商编码",
value: "thirdPartyCode", value: "thirdPartyCode",
}, { },
{
label: "参考售价", label: "参考售价",
value: "upgradePrice", value: "upgradePrice",
unit: true, unit: true,
}, { },
{
label: "适用车型", label: "适用车型",
value: "carTypeConfigName", value: "carTypeConfigName",
}, { },
{
label: "所属系列", label: "所属系列",
value: "goodsName", value: "goodsName",
}, { },
{
label: "所属分类", label: "所属分类",
value: "tempGoodsTypeName", value: "tempGoodsTypeName",
}, { },
{
label: "产品ID", label: "产品ID",
value: "upgradeCommodityCode", value: "upgradeCommodityCode",
}, { },
{
label: "运营成本/元", label: "运营成本/元",
value: "operationCost", value: "operationCost",
type: 'price' type: "price",
}], },
],
}, },
{ {
name: "positionStr", name: "positionStr",
......
export const statusList = [
{
confId: 3,
confValue: "草稿",
},
{
confId: 4,
confValue: "待审核",
},
{
confId: 1,
confValue: "已上架",
},
{
confId: 0,
confValue: "已下架",
},
];
export const financeCheckFlagList = [
{
confId: "Y",
confValue: "开启",
},
{
confId: "N",
confValue: "关闭",
},
];
export const sellPriceTempValidStatusList = [
{
confId: "1",
confValue: "待生效",
},
{
confId: "2",
confValue: "已生效",
},
{
confId: "3",
confValue: "已失效",
},
];
export const inventoryTypeList = [
{
confId: 2,
confValue: "实物",
},
{
confId: 1,
confValue: "虚拟",
},
];
import { isArray } from "lodash-es";
// 处理金额补零
export function priceFilter(num) {
const pow = 10 ** 2;
if (filterEmpty(num)) {
return "-";
}
return (Math.round(num * pow) / pow).toFixed(2);
}
// 校验是否为空 不包含0
function filterEmpty(data) {
return isArray(data) ? data.length <= 0 : (data ?? "") === "";
}
...@@ -23,9 +23,9 @@ import { mapActions } from "vuex"; ...@@ -23,9 +23,9 @@ import { mapActions } from "vuex";
import { BaseData } from "@/common/constants.js"; import { BaseData } from "@/common/constants.js";
import { deepClone, Util } from "@/common/util"; import { deepClone, Util } from "@/common/util";
import { baseConfig } from "@/main"; import { baseConfig } from "@/main";
import { convertYuanToWan, filterSpecsStr } from "../filterOption"; import { convertYuanToWan, filterSpecsStr } from "@/views/goods/filterOption";
import groundingForm from "./components/groundingForm.vue"; import groundingForm from "@/views/goods/grounding/components/groundingForm.vue";
import { baseSupplyModeList, productList, upgradeSupplyModeList } from "./constants/data"; import { baseSupplyModeList, productList, upgradeSupplyModeList } from "@/views/goods/grounding/constants/data";
export default { export default {
name: "EditGrounding", name: "EditGrounding",
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!