This commit is contained in:
wwz
2025-04-11 15:47:01 +08:00
6 changed files with 32 additions and 11 deletions

View File

@@ -108,7 +108,7 @@
<el-radio-button value="month">本月</el-radio-button>
<el-radio-button value="custom">自定义</el-radio-button>
</el-radio-group>
<div class="flex" v-if="timeValue === 'custom'">
<div class="flex" v-if="timeValue === 'custom' || !item.attrs?.showFastEdit">
<el-date-picker v-model="queryParams[item.prop]" v-bind="item.attrs" />
</div>
</template>

View File

@@ -116,4 +116,16 @@ export function downloadFile(obj: BlobPart, name: string, suffix: string, useUni
document.body.appendChild(link);
link.click();
document.body.removeChild(link);
}
}
/**
* 判断主店同步是否启用
*/
export function isSyncStatus() {
let userInfo = ref(JSON.parse(localStorage.getItem('userInfo') || '{}'))
if (userInfo.value.isHeadShop == 0 && userInfo.value.isEnableProdSync == 1 && userInfo.value.isEnableVipSync == 1 && userInfo.value.isEnableConsSync == 1) {
return true
}else {
return false
}
}

View File

@@ -162,7 +162,7 @@
<el-radio :value="2">接口</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="是否外链" prop="path">
<el-form-item label="是否外链" >
<el-switch
v-model="formData.iFrame"
:active-value="1"

View File

@@ -12,15 +12,16 @@
</el-form-item>
<el-form-item v-if="isHeadShop == 1">
<el-select v-model="shopId" placeholder="选择分店" style="width: 200px; margin-right: 10px" @change="getCategory">
<el-select v-model="shopId" placeholder="选择分店" style="width: 200px; margin-right: 10px"
@change="getCategory">
<el-option v-for="item in branchList" :key="item.shopId" :label="item.shopName" :value="item.shopId" />
</el-select>
</el-form-item>
<el-form-item>
<!-- <el-form-item>
<el-select v-model="query.prodCategoryId" placeholder="商品分类" style="width: 140px">
<el-option :label="item.name" :value="item.id" v-for="item in categorys" :key="item.id"></el-option>
</el-select>
</el-form-item>
</el-form-item> -->
</template>
<el-form-item>
<el-radio-group v-model="timeValue" @change="timeChange">

View File

@@ -159,6 +159,7 @@ import UserAPI from "@/api/product/index";
import { useRouter } from "vue-router";
import type { IObject, IOperatData } from "@/components/CURD/types";
import usePage from "@/components/CURD/usePage";
import { isSyncStatus } from "@/utils/index";
import addModalConfig from "./indexconfig/add";
import contentConfig from "./indexconfig/content";
import MultiImageUpload from "@/components/Upload/MultiImageUpload.vue"
@@ -199,11 +200,19 @@ let datas = reactive({
remark: "",
images: []
});
if (JSON.parse(localStorage.getItem('userInfo') || '{}').isHeadShop == 0) {
contentConfig.toolbar.splice(0, 1)
if (isSyncStatus()) {
if( JSON.stringify(contentConfig.toolbar)?.indexOf("add") != -1){
contentConfig.toolbar?.splice(0, 1)
}
if( JSON.stringify(contentConfig.cols[contentConfig.cols.length-1].operat)?.indexOf("delete") != -1){
contentConfig.cols[contentConfig.cols.length-1].operat?.splice(2, 1)
}
}else {
contentConfig.toolbar.splice(1, 1)
if( JSON.stringify(contentConfig.toolbar)?.indexOf("custom2") != -1){
contentConfig.toolbar?.splice(1, 1)
}
}
onMounted(() => {
console.log(route.query);
if (route.query.id) {

View File

@@ -117,8 +117,7 @@ async function getTableData() {
const res = await ShopBranchApi.getList({
page: state.tableData.page,
size: state.tableData.size,
shopName: state.query.name,
status: state.query.status,
branchShopName: state.query.name,
});
state.tableData.loading = false;
state.tableData.list = res.records;