feat: 商品同步规则优化
This commit is contained in:
@@ -172,7 +172,7 @@ function handleLogin() {
|
|||||||
setDouyinToken(checkInfo.userInfo.token);
|
setDouyinToken(checkInfo.userInfo.token);
|
||||||
});
|
});
|
||||||
localStorage.removeItem("shopName")
|
localStorage.removeItem("shopName")
|
||||||
|
let resData = await $API_login.getPermission()
|
||||||
|
|
||||||
const { path, queryParams } = parseRedirect();
|
const { path, queryParams } = parseRedirect();
|
||||||
console.log(path, queryParams);
|
console.log(path, queryParams);
|
||||||
|
|||||||
@@ -176,6 +176,8 @@ import searchConfig from "./goodsGroupconfig/search";
|
|||||||
import searchConfig2 from "./goodsGroupconfig/search2";
|
import searchConfig2 from "./goodsGroupconfig/search2";
|
||||||
import myDialog from '@/components/mycomponents/myDialog.vue'
|
import myDialog from '@/components/mycomponents/myDialog.vue'
|
||||||
import selectGoodslist from "./goodsGroupconfig/selectGoodslist.vue"
|
import selectGoodslist from "./goodsGroupconfig/selectGoodslist.vue"
|
||||||
|
import { isSyncStatus } from "@/utils/index";
|
||||||
|
|
||||||
const {
|
const {
|
||||||
searchRef,
|
searchRef,
|
||||||
searchRefs,
|
searchRefs,
|
||||||
@@ -194,6 +196,18 @@ const {
|
|||||||
handleFilterChange,
|
handleFilterChange,
|
||||||
} = usePage();
|
} = usePage();
|
||||||
|
|
||||||
|
if (isSyncStatus()) {
|
||||||
|
contentConfig.toolbar[0].hidden = true
|
||||||
|
contentConfig.cols[contentConfig.cols.length - 1].operat[0].hidden = true
|
||||||
|
contentConfig.cols[contentConfig.cols.length - 1].operat[1].hidden = true
|
||||||
|
contentConfig.cols[3].templet = "custom"
|
||||||
|
} else {
|
||||||
|
contentConfig.toolbar[0].hidden = false
|
||||||
|
contentConfig.cols[3].templet = "switch"
|
||||||
|
contentConfig.cols[contentConfig.cols.length - 1].operat[0].hidden = false
|
||||||
|
contentConfig.cols[contentConfig.cols.length - 1].operat[1].hidden = false
|
||||||
|
}
|
||||||
|
|
||||||
let switchref = ref(false)
|
let switchref = ref(false)
|
||||||
|
|
||||||
// 新增
|
// 新增
|
||||||
|
|||||||
@@ -73,7 +73,7 @@ const contentConfig: IContentConfig<UserPageQuery> = {
|
|||||||
fixed: "right",
|
fixed: "right",
|
||||||
width: 280,
|
width: 280,
|
||||||
templet: "tool",
|
templet: "tool",
|
||||||
operat: ["edit", "delete"],
|
operat: [{ text: "编辑", icon: 'edit', name: "edit"}, { text: "删除", icon: 'delete', type: 'danger', name: "delete"}],
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -95,6 +95,7 @@ import contentConfig from "./categoryconfig/content";
|
|||||||
import contentConfig2 from "./categoryconfig/content2";
|
import contentConfig2 from "./categoryconfig/content2";
|
||||||
import editModalConfig from "./categoryconfig/edit";
|
import editModalConfig from "./categoryconfig/edit";
|
||||||
import searchConfig from "./categoryconfig/search";
|
import searchConfig from "./categoryconfig/search";
|
||||||
|
import { isSyncStatus } from "@/utils/index";
|
||||||
|
|
||||||
const {
|
const {
|
||||||
searchRef,
|
searchRef,
|
||||||
@@ -111,6 +112,17 @@ const {
|
|||||||
handleFilterChange,
|
handleFilterChange,
|
||||||
} = usePage();
|
} = usePage();
|
||||||
|
|
||||||
|
if (isSyncStatus()) {
|
||||||
|
contentConfig.toolbar[0].hidden = true
|
||||||
|
contentConfig.cols[contentConfig.cols.length - 1].operat[0].hidden = true
|
||||||
|
contentConfig.cols[contentConfig.cols.length - 1].operat[1].hidden = true
|
||||||
|
contentConfig.cols[2].templet = "custom"
|
||||||
|
} else {
|
||||||
|
contentConfig.toolbar[0].hidden = false
|
||||||
|
contentConfig.cols[2].templet = "switch"
|
||||||
|
contentConfig.cols[contentConfig.cols.length - 1].operat[0].hidden = false
|
||||||
|
contentConfig.cols[contentConfig.cols.length - 1].operat[1].hidden = false
|
||||||
|
}
|
||||||
// 新增
|
// 新增
|
||||||
async function handleAddClick() {
|
async function handleAddClick() {
|
||||||
addModalRef.value?.setModalVisible();
|
addModalRef.value?.setModalVisible();
|
||||||
|
|||||||
@@ -44,7 +44,15 @@ const contentConfig: IContentConfig<UserPageQuery> = {
|
|||||||
// return res.list;
|
// return res.list;
|
||||||
// },
|
// },
|
||||||
pk: "id",
|
pk: "id",
|
||||||
toolbar: ["add"],
|
toolbar: [
|
||||||
|
{
|
||||||
|
icon: "plus",
|
||||||
|
text: "新增",
|
||||||
|
type: "primary",
|
||||||
|
name: "add",
|
||||||
|
auth: "import",
|
||||||
|
},
|
||||||
|
],
|
||||||
cols: [
|
cols: [
|
||||||
// { type: "selection", width: 50, align: "center" },
|
// { type: "selection", width: 50, align: "center" },
|
||||||
{ label: "分类名称", align: "center", prop: "name" },
|
{ label: "分类名称", align: "center", prop: "name" },
|
||||||
@@ -68,7 +76,7 @@ const contentConfig: IContentConfig<UserPageQuery> = {
|
|||||||
fixed: "right",
|
fixed: "right",
|
||||||
width: 280,
|
width: 280,
|
||||||
templet: "tool",
|
templet: "tool",
|
||||||
operat: ["edit", "delete"],
|
operat: [{ text: "编辑", icon: 'edit', name: "edit"}, { text: "删除", icon: 'delete', type: 'danger', name: "delete"}],
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -29,10 +29,10 @@
|
|||||||
<copy-button v-if="scope.row[scope.prop]" :text="scope.row[scope.prop]" style="margin-left: 2px" />
|
<copy-button v-if="scope.row[scope.prop]" :text="scope.row[scope.prop]" style="margin-left: 2px" />
|
||||||
</template>
|
</template>
|
||||||
<template #operates="scope">
|
<template #operates="scope">
|
||||||
<el-button type="text" size="small" v-if="scope.row.level < 3"
|
<el-button type="text" size="small" v-if="scope.row.level < 3&&!isSyncStatus()"
|
||||||
@click="addlowerLevel(scope.row)">添加下一级</el-button>
|
@click="addlowerLevel(scope.row)">添加下一级</el-button>
|
||||||
<el-button type="text" size="small" @click="handleEditClick(scope.row)">编辑</el-button>
|
<el-button type="text" size="small" v-if="!isSyncStatus()" @click="handleEditClick(scope.row)">编辑</el-button>
|
||||||
<el-button type="text" size="small" @click="deleteClick(scope.row)">删除</el-button>
|
<el-button type="text" size="small" v-if="!isSyncStatus()" @click="deleteClick(scope.row)">删除</el-button>
|
||||||
</template>
|
</template>
|
||||||
</page-content>
|
</page-content>
|
||||||
<!-- 添加下一级-编辑 -->
|
<!-- 添加下一级-编辑 -->
|
||||||
@@ -123,6 +123,8 @@ import contentConfig2 from "./specificationsconfig/content2";
|
|||||||
import editModalConfig from "./specificationsconfig/edit";
|
import editModalConfig from "./specificationsconfig/edit";
|
||||||
import searchConfig from "./specificationsconfig/search";
|
import searchConfig from "./specificationsconfig/search";
|
||||||
import { pid } from "process";
|
import { pid } from "process";
|
||||||
|
import { isSyncStatus } from "@/utils/index";
|
||||||
|
|
||||||
const validateSku1 = (rule, value, callback) => {
|
const validateSku1 = (rule, value, callback) => {
|
||||||
if (!datas.skuForm.label) {
|
if (!datas.skuForm.label) {
|
||||||
callback(new Error(' '))
|
callback(new Error(' '))
|
||||||
@@ -190,6 +192,12 @@ let datas = reactive({
|
|||||||
addchilderinfo: {}
|
addchilderinfo: {}
|
||||||
})
|
})
|
||||||
let myDialogRef = ref(null)
|
let myDialogRef = ref(null)
|
||||||
|
if (isSyncStatus()) {
|
||||||
|
contentConfig.toolbar[0].hidden = true
|
||||||
|
} else {
|
||||||
|
contentConfig.toolbar[0].hidden = false
|
||||||
|
}
|
||||||
|
|
||||||
function subitgood() {
|
function subitgood() {
|
||||||
skuForm.value.validate(async valid => {
|
skuForm.value.validate(async valid => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
@@ -381,4 +389,4 @@ const isA = ref(true);
|
|||||||
margin-left: 10px;
|
margin-left: 10px;
|
||||||
vertical-align: bottom;
|
vertical-align: bottom;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -41,7 +41,13 @@ const contentConfig: IContentConfig<UserPageQuery> = {
|
|||||||
// },
|
// },
|
||||||
pk: "id",
|
pk: "id",
|
||||||
toolbar: [
|
toolbar: [
|
||||||
"add",
|
{
|
||||||
|
icon: "plus",
|
||||||
|
text: "新增",
|
||||||
|
type: "primary",
|
||||||
|
name: "add",
|
||||||
|
auth: "import",
|
||||||
|
},
|
||||||
],
|
],
|
||||||
cols: [
|
cols: [
|
||||||
// { type: "selection", width: 50, align: "center" },
|
// { type: "selection", width: 50, align: "center" },
|
||||||
|
|||||||
@@ -61,6 +61,7 @@ import contentConfig from "./unitconfig/content";
|
|||||||
import contentConfig2 from "./unitconfig/content2";
|
import contentConfig2 from "./unitconfig/content2";
|
||||||
import editModalConfig from "./unitconfig/edit";
|
import editModalConfig from "./unitconfig/edit";
|
||||||
import searchConfig from "./unitconfig/search";
|
import searchConfig from "./unitconfig/search";
|
||||||
|
import { isSyncStatus } from "@/utils/index";
|
||||||
|
|
||||||
const {
|
const {
|
||||||
searchRef,
|
searchRef,
|
||||||
@@ -77,6 +78,16 @@ const {
|
|||||||
handleFilterChange,
|
handleFilterChange,
|
||||||
} = usePage();
|
} = usePage();
|
||||||
|
|
||||||
|
if (isSyncStatus()) {
|
||||||
|
contentConfig.toolbar[0].hidden = true
|
||||||
|
contentConfig.cols[contentConfig.cols.length - 1].operat[0].hidden = true
|
||||||
|
contentConfig.cols[contentConfig.cols.length - 1].operat[1].hidden = true
|
||||||
|
} else {
|
||||||
|
contentConfig.toolbar[0].hidden = false
|
||||||
|
contentConfig.cols[contentConfig.cols.length - 1].operat[0].hidden = false
|
||||||
|
contentConfig.cols[contentConfig.cols.length - 1].operat[1].hidden = false
|
||||||
|
}
|
||||||
|
|
||||||
// 新增
|
// 新增
|
||||||
async function handleAddClick() {
|
async function handleAddClick() {
|
||||||
addModalRef.value?.setModalVisible();
|
addModalRef.value?.setModalVisible();
|
||||||
|
|||||||
@@ -38,7 +38,13 @@ const contentConfig: IContentConfig<UserPageQuery> = {
|
|||||||
},
|
},
|
||||||
pk: "id",
|
pk: "id",
|
||||||
toolbar: [
|
toolbar: [
|
||||||
"add",
|
{
|
||||||
|
icon: "plus",
|
||||||
|
text: "新增",
|
||||||
|
type: "primary",
|
||||||
|
name: "add",
|
||||||
|
auth: "import",
|
||||||
|
},
|
||||||
],
|
],
|
||||||
cols: [
|
cols: [
|
||||||
// { type: "selection", width: 50, align: "center" },
|
// { type: "selection", width: 50, align: "center" },
|
||||||
@@ -50,7 +56,7 @@ const contentConfig: IContentConfig<UserPageQuery> = {
|
|||||||
fixed: "right",
|
fixed: "right",
|
||||||
width: 280,
|
width: 280,
|
||||||
templet: "tool",
|
templet: "tool",
|
||||||
operat: ["edit", "delete"],
|
operat: [{ text: "编辑", icon: 'edit', name: "edit"}, { text: "删除", icon: 'delete', type: 'danger', name: "delete"}],
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user