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