修改: bug
All checks were successful
构建并部署前端到测试环境 / build-and-deploy (push) Successful in 4m47s

This commit is contained in:
sexygoat
2026-02-27 17:40:02 +08:00
parent f1cb1e53c8
commit 4470a4ef04
17 changed files with 908 additions and 544 deletions

View File

@@ -97,7 +97,8 @@
<ElInput v-model="form.district" placeholder="请输入区县" />
</ElFormItem>
</ElCol>
<ElCol :span="12">
<!-- 只有非代理账号才显示归属店铺选择 -->
<ElCol :span="12" v-if="!isAgentAccount">
<ElFormItem label="归属店铺" prop="owner_shop_id">
<ElSelect
v-model="form.owner_shop_id"
@@ -219,6 +220,7 @@
import type { SearchFormItem } from '@/types'
import { useCheckedColumns } from '@/composables/useCheckedColumns'
import { useAuth } from '@/composables/useAuth'
import { useUserStore } from '@/store/modules/user'
import ArtButtonTable from '@/components/core/forms/ArtButtonTable.vue'
import ArtMenuRight from '@/components/core/others/ArtMenuRight.vue'
import type { MenuItemType } from '@/components/core/others/ArtMenuRight.vue'
@@ -227,9 +229,13 @@
defineOptions({ name: 'EnterpriseCustomer' })
const { hasAuth } = useAuth()
const userStore = useUserStore()
const router = useRouter()
// 判断是否是代理账号 (user_type === 3)
const isAgentAccount = computed(() => userStore.info.user_type === 3)
const dialogVisible = ref(false)
const passwordDialogVisible = ref(false)
const loading = ref(false)
@@ -488,7 +494,10 @@
onMounted(() => {
getTableData()
loadShopList()
// 只有非代理账号才需要加载店铺列表
if (!isAgentAccount.value) {
loadShopList()
}
})
// 加载店铺列表(默认加载20条)
@@ -609,7 +618,8 @@
form.contact_phone = ''
form.login_phone = ''
form.password = ''
form.owner_shop_id = null
// 如果是代理账号,自动设置归属店铺为当前登录用户的店铺
form.owner_shop_id = isAgentAccount.value ? userStore.info.shop_id : null
}
// 重置表单验证状态