设置总行运营搜索框权限
This commit is contained in:
parent
c529348c3f
commit
a7d6d144d7
@ -1,9 +1,10 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref } from 'vue';
|
import { ref } from 'vue';
|
||||||
import { useNaiveForm } from '@/hooks/common/form';
|
|
||||||
import { $t } from '@/locales';
|
|
||||||
import {useDict} from "@/hooks/business/dict";
|
|
||||||
import {fetchGetDeptTree} from "@/service/api/system";
|
import {fetchGetDeptTree} from "@/service/api/system";
|
||||||
|
import {useAuthStore} from "@/store/modules/auth";
|
||||||
|
import { useNaiveForm } from '@/hooks/common/form';
|
||||||
|
import {useDict} from "@/hooks/business/dict";
|
||||||
|
import { $t } from '@/locales';
|
||||||
import {useLoading} from "~/packages/hooks";
|
import {useLoading} from "~/packages/hooks";
|
||||||
|
|
||||||
defineOptions({
|
defineOptions({
|
||||||
@ -14,7 +15,7 @@ interface Props {
|
|||||||
/** 业务类型选项 */
|
/** 业务类型选项 */
|
||||||
subcategoryIdOptions?: CommonType.Option<CommonType.IdType>[];
|
subcategoryIdOptions?: CommonType.Option<CommonType.IdType>[];
|
||||||
}
|
}
|
||||||
|
const { userInfo } = useAuthStore();
|
||||||
const props = withDefaults(defineProps<Props>(), {
|
const props = withDefaults(defineProps<Props>(), {
|
||||||
subcategoryIdOptions: () => []
|
subcategoryIdOptions: () => []
|
||||||
});
|
});
|
||||||
@ -45,7 +46,9 @@ async function getDeptData() {
|
|||||||
}
|
}
|
||||||
endDeptLoading();
|
endDeptLoading();
|
||||||
}
|
}
|
||||||
|
if(userInfo.roles.includes('operation')){
|
||||||
getDeptData();
|
getDeptData();
|
||||||
|
}
|
||||||
|
|
||||||
const dateRangeCreateTime = ref<[string, string] | null>(null);
|
const dateRangeCreateTime = ref<[string, string] | null>(null);
|
||||||
function onDateRangeCreateTimeUpdate(value: [string, string] | null) {
|
function onDateRangeCreateTimeUpdate(value: [string, string] | null) {
|
||||||
@ -74,7 +77,7 @@ async function search() {
|
|||||||
<NCollapseItem :title="$t('common.search')" name="user-search">
|
<NCollapseItem :title="$t('common.search')" name="user-search">
|
||||||
<NForm ref="formRef" :model="model" label-placement="left" :label-width="80">
|
<NForm ref="formRef" :model="model" label-placement="left" :label-width="80">
|
||||||
<NGrid responsive="screen" item-responsive>
|
<NGrid responsive="screen" item-responsive>
|
||||||
<NFormItemGi span="24 s:12 m:6" label="业务类型" path="subcategoryName" class="pr-24px">
|
<NFormItemGi span="24 s:12 m:12" label="业务类型" path="subcategoryName" class="pr-24px">
|
||||||
<NSelect
|
<NSelect
|
||||||
v-model:value="model.subcategoryId"
|
v-model:value="model.subcategoryId"
|
||||||
filterable
|
filterable
|
||||||
@ -83,30 +86,6 @@ async function search() {
|
|||||||
clearable
|
clearable
|
||||||
/>
|
/>
|
||||||
</NFormItemGi>
|
</NFormItemGi>
|
||||||
<!-- <NFormItemGi span="24 s:12 m:6" label="营销人员名称" path="yxName" class="pr-24px">-->
|
|
||||||
<!-- <NInput v-model:value="model.yxName" placeholder="请输入营销人员名称" />-->
|
|
||||||
<!-- </NFormItemGi>-->
|
|
||||||
<NFormItemGi span="24 s:12 m:6" label="经办人员名称" path="jbName" class="pr-24px">
|
|
||||||
<NInput v-model:value="model.jbName" placeholder="请输入经办人员名称" />
|
|
||||||
</NFormItemGi>
|
|
||||||
<!-- <NFormItemGi span="24 s:12 m:6" label="营销人员营销号" path="yxId" class="pr-24px">-->
|
|
||||||
<!-- <NInput v-model:value="model.yxId" placeholder="请输入营销人员营销号" />-->
|
|
||||||
<!-- </NFormItemGi>-->
|
|
||||||
<NFormItemGi span="24 s:12 m:6" label="经办人员营销号" path="jbId" class="pr-24px">
|
|
||||||
<NInput v-model:value="model.jbId" placeholder="请输入经办人员营销号" />
|
|
||||||
</NFormItemGi>
|
|
||||||
<NFormItemGi span="24 s:12 m:6" label="部门名称" path="deptName" class="pr-24px">
|
|
||||||
<NTreeSelect
|
|
||||||
v-model:value="model.deptId"
|
|
||||||
:loading="deptLoading"
|
|
||||||
clearable
|
|
||||||
:options="deptData as []"
|
|
||||||
label-field="label"
|
|
||||||
key-field="id"
|
|
||||||
:default-expanded-keys="deptData?.length ? [deptData[0].id] : []"
|
|
||||||
placeholder="请选择部门名称"
|
|
||||||
/>
|
|
||||||
</NFormItemGi>
|
|
||||||
<NFormItemGi span="24 s:12 m:12" label="业务日期" path="date" class="pr-24px">
|
<NFormItemGi span="24 s:12 m:12" label="业务日期" path="date" class="pr-24px">
|
||||||
<NDatePicker
|
<NDatePicker
|
||||||
v-model:formatted-value="dateRangeCreateTime"
|
v-model:formatted-value="dateRangeCreateTime"
|
||||||
@ -118,6 +97,31 @@ async function search() {
|
|||||||
@update:formatted-value="onDateRangeCreateTimeUpdate"
|
@update:formatted-value="onDateRangeCreateTimeUpdate"
|
||||||
/>
|
/>
|
||||||
</NFormItemGi>
|
</NFormItemGi>
|
||||||
|
<!-- <NFormItemGi span="24 s:12 m:6" label="营销人员名称" path="yxName" class="pr-24px">-->
|
||||||
|
<!-- <NInput v-model:value="model.yxName" placeholder="请输入营销人员名称" />-->
|
||||||
|
<!-- </NFormItemGi>-->
|
||||||
|
<NFormItemGi span="24 s:12 m:6" v-if="userInfo.roles.includes('operation')" label="经办人员名称" path="jbName" class="pr-24px">
|
||||||
|
<NInput v-model:value="model.jbName" placeholder="请输入经办人员名称" />
|
||||||
|
</NFormItemGi>
|
||||||
|
<!-- <NFormItemGi span="24 s:12 m:6" label="营销人员营销号" path="yxId" class="pr-24px">-->
|
||||||
|
<!-- <NInput v-model:value="model.yxId" placeholder="请输入营销人员营销号" />-->
|
||||||
|
<!-- </NFormItemGi>-->
|
||||||
|
<NFormItemGi span="24 s:12 m:6" v-if="userInfo.roles.includes('operation')" label="经办人员营销号" path="jbId" class="pr-24px">
|
||||||
|
<NInput v-model:value="model.jbId" placeholder="请输入经办人员营销号" />
|
||||||
|
</NFormItemGi>
|
||||||
|
<NFormItemGi v-if="userInfo.roles.includes('operation')" span="24 s:12 m:6" label="部门名称" path="deptName" class="pr-24px">
|
||||||
|
<NTreeSelect
|
||||||
|
v-model:value="model.deptId"
|
||||||
|
:loading="deptLoading"
|
||||||
|
clearable
|
||||||
|
:options="deptData as []"
|
||||||
|
label-field="label"
|
||||||
|
key-field="id"
|
||||||
|
:default-expanded-keys="deptData?.length ? [deptData[0].id] : []"
|
||||||
|
placeholder="请选择部门名称"
|
||||||
|
/>
|
||||||
|
</NFormItemGi>
|
||||||
|
|
||||||
<!-- <NFormItemGi span="24 s:12 m:6" label="部门id" path="deptId" class="pr-24px">-->
|
<!-- <NFormItemGi span="24 s:12 m:6" label="部门id" path="deptId" class="pr-24px">-->
|
||||||
<!-- <NInput v-model:value="model.deptId" placeholder="请输入部门id" />-->
|
<!-- <NInput v-model:value="model.deptId" placeholder="请输入部门id" />-->
|
||||||
<!-- </NFormItemGi>-->
|
<!-- </NFormItemGi>-->
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user