feat:分店筛选显示条件增加

This commit is contained in:
GaoHao
2025-04-09 17:32:50 +08:00
parent 448261e7b2
commit f1e85eeb27
5 changed files with 23 additions and 43 deletions

View File

@@ -2,24 +2,12 @@
<div class="app-container">
<!-- 列表 -->
<!-- 搜索 -->
<page-search
ref="searchRef"
:search-config="searchConfig"
@query-click="handleQueryClick"
@reset-click="handleResetClick"
/>
<page-search ref="searchRef" :search-config="searchConfig" @query-click="handleQueryClick"
@reset-click="handleResetClick" />
<!-- 列表 -->
<page-content
ref="contentRef"
:content-config="contentConfig"
@add-click="handleAddClick"
@edit-click="handleEditClick"
@export-click="handleExportClick"
@search-click="handleSearchClick"
@toolbar-click="handleToolbarClick"
@operat-click="handleOperatClick"
@filter-change="handleFilterChange"
>
<page-content ref="contentRef" :content-config="contentConfig" @add-click="handleAddClick"
@edit-click="handleEditClick" @export-click="handleExportClick" @search-click="handleSearchClick"
@toolbar-click="handleToolbarClick" @operat-click="handleOperatClick" @filter-change="handleFilterChange">
<template #status="scope">
<el-tag :type="scope.row[scope.prop] == 1 ? 'success' : 'info'">
{{ scope.row[scope.prop] == 1 ? "启用" : "禁用" }}
@@ -33,11 +21,7 @@
</template>
<template #mobile="scope">
<el-text>{{ scope.row[scope.prop] }}</el-text>
<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>
</page-content>
@@ -47,12 +31,8 @@
<h3 style="color: rgb(63, 158, 255)">收银机权限设置</h3>
<div>
<el-checkbox-group v-model="addPagePathIdList">
<el-checkbox
v-for="(item, index) in pagePathIdLists"
:key="index"
:value="item.value"
:label="item.label"
/>
<el-checkbox v-for="(item, index) in pagePathIdLists" :key="index" :value="item.value"
:label="item.label" />
</el-checkbox-group>
</div>
<h3 style="color: rgb(63, 158, 255)">员工权限设置</h3>
@@ -62,21 +42,13 @@
</page-modal>
<!-- 编辑 -->
<page-modal
ref="editModalRef"
:modal-config="editModalConfig"
@submit-click="handleSubmitClick"
>
<page-modal ref="editModalRef" :modal-config="editModalConfig" @submit-click="handleSubmitClick">
<template #formFooter>
<h3 style="color: rgb(63, 158, 255)">收银机权限设置</h3>
<div>
<el-checkbox-group v-model="editPagePathIdList">
<el-checkbox
v-for="(item, index) in pagePathIdLists"
:key="index"
:value="item.value"
:label="item.label"
/>
<el-checkbox v-for="(item, index) in pagePathIdLists" :key="index" :value="item.value"
:label="item.label" />
</el-checkbox-group>
</div>
<h3 style="color: rgb(63, 158, 255)">员工权限设置</h3>
@@ -143,6 +115,9 @@ const oldeditSubmitFunc = editModalConfig.formAction;
// 数据初始化
async function init() {
// 覆写添加确定方法
if (JSON.parse(localStorage.getItem('userInfo') || '{}').isHeadShop == 0) {
searchConfig.formItems.splice(0, 1)
}
addModalConfig.formAction = function (data) {
return ShopStaffApi.add({
...data,