添加角色参数

master
doublekou 1 year ago
commit 6717c6568c

@ -25,9 +25,15 @@ export function getReservation(pageParams: queryReservation) {
params: pageParams params: pageParams
}) })
} }
export function deleteShop(id: number) { export function deleteShop(id: number) {
return httpClient.delete<ApiResult<void>>(`/store/${id}`) return httpClient.delete<ApiResult<void>>(`/store/${id}`)
} }
export function exportI18nDataExcel(params: queryReservation) { export function exportI18nDataExcel(params: queryReservation) {
return httpClient.get('/store/export', { params, responseType: 'blob' }) return httpClient.get('/store/export', { params, responseType: 'blob' })
} }
// 所有店铺列表
export function getShopQueryAll(type: number) {
return httpClient.get('/store/queryAll', { params: { roleType: type } })
}

@ -1,8 +1,8 @@
<template> <template>
<a-dropdown> <a-dropdown>
<TranslationOutlined style="font-size: 18px" /> <!-- <TranslationOutlined style="font-size: 18px" /> -->
<template #overlay> <!-- <template #overlay>
<a-menu :selected-keys="[i18nStore.language]"> <a-menu :selected-keys="[i18nStore.language]">
<a-menu-item <a-menu-item
v-for="language of supportLanguage" v-for="language of supportLanguage"
@ -13,7 +13,7 @@
{{ language.title }} {{ language.title }}
</a-menu-item> </a-menu-item>
</a-menu> </a-menu>
</template> </template> -->
</a-dropdown> </a-dropdown>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">

@ -30,6 +30,7 @@
<a-input <a-input
v-model:value="modelRef.code" v-model:value="modelRef.code"
size="large" size="large"
type="number"
auto-complete="off" auto-complete="off"
placeholder="验证码" placeholder="验证码"
style="width: 63%" style="width: 63%"

@ -106,6 +106,10 @@ const columns: ProColumns[] = [
title: '联系方式', title: '联系方式',
dataIndex: 'customNid' dataIndex: 'customNid'
}, },
{
title: '分发门店',
dataIndex: 'storeName'
},
{ {
title: '分发状态', title: '分发状态',
dataIndex: 'enrollStatus', dataIndex: 'enrollStatus',
@ -114,6 +118,8 @@ const columns: ProColumns[] = [
return h('div', '待分发') return h('div', '待分发')
} else if (record.enrollStatus === 1) { } else if (record.enrollStatus === 1) {
return h('div', '已分发') return h('div', '已分发')
} else if (record.enrollStatus === 2) {
return h('div', '已通过')
} }
} }
}, },

@ -1,11 +1,3 @@
<!--
* @Author: error: error: git config user.name & please set dead value or install git && error: git config user.email & please set dead value or install git & please set dead value or install git
* @Date: 2023-09-12 13:56:02
* @LastEditors: error: error: git config user.name & please set dead value or install git && error: git config user.email & please set dead value or install git & please set dead value or install git
* @LastEditTime: 2023-09-14 17:37:10
* @FilePath: \byhl-zt\src\views\qualityInspectionDistribution\inspectionModal.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<template> <template>
<a-modal <a-modal
:title="title" :title="title"
@ -84,7 +76,6 @@ import { overrideProperties } from '@/utils/bean-utils'
import { message } from 'ant-design-vue' import { message } from 'ant-design-vue'
import type { CustomerDTO, GeopoliticalCustomersRecord } from '@/api/geopoliticalCustomers/types' import type { CustomerDTO, GeopoliticalCustomersRecord } from '@/api/geopoliticalCustomers/types'
import { updateCustomerAudit } from '@/api/geopoliticalCustomers/index' import { updateCustomerAudit } from '@/api/geopoliticalCustomers/index'
import { doRequest } from '@/utils/axios/request'
import { useAdminForm, useFormAction, FormAction, labelCol, wrapperCol } from '@/hooks/form' import { useAdminForm, useFormAction, FormAction, labelCol, wrapperCol } from '@/hooks/form'
import { useUserStore } from '@/stores/user-store' import { useUserStore } from '@/stores/user-store'
// //

@ -22,11 +22,16 @@
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :xl="8" :md="12" :sm="24"> <a-col :xl="8" :md="12" :sm="24">
<a-form-item label="分发门店"> <a-form-item label="分发门店" name="customNid">
<a-input v-model:value="formModel.customNid" placeholder="请输入" /> <a-select
v-model:value="formModel.customNid"
:field-names="{ label: 'storeName', value: 'id' }"
:options="shopList"
placeholder="请选择分发门店"
/>
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :xl="8" :md="12" :sm="24"> <!-- <a-col :xl="8" :md="12" :sm="24">
<a-form-item label="分发时间"> <a-form-item label="分发时间">
<a-range-picker <a-range-picker
v-model:value="searchTimeValue" v-model:value="searchTimeValue"
@ -38,7 +43,7 @@
}" }"
/> />
</a-form-item> </a-form-item>
</a-col> </a-col> -->
<a-col :xl="24" :md="24" :sm="24"> <a-col :xl="24" :md="24" :sm="24">
<search-actions :loading="props.loading" @search="search" @reset="reset" /> <search-actions :loading="props.loading" @search="search" @reset="reset" />
</a-col> </a-col>
@ -50,8 +55,10 @@
<script setup lang="ts"> <script setup lang="ts">
import { Form } from 'ant-design-vue' import { Form } from 'ant-design-vue'
import type { GeopoliticalCustomersSearch } from '@/api/geopoliticalCustomers/types' import type { GeopoliticalCustomersSearch } from '@/api/geopoliticalCustomers/types'
import { getShopQueryAll } from '@/api/shopManage/index'
import dayjs from 'dayjs' import dayjs from 'dayjs'
import type { Dayjs } from 'dayjs' import type { Dayjs } from 'dayjs'
import { doRequest } from '@/utils/axios/request'
// //
import { useUserStore } from '@/stores/user-store' import { useUserStore } from '@/stores/user-store'
const { userInfo } = useUserStore() const { userInfo } = useUserStore()
@ -61,6 +68,7 @@ onMounted(() => {
console.log(userInfo, 'userInfo?.permissions') console.log(userInfo, 'userInfo?.permissions')
// userInfoCurrent = userInfo?.roleCodes // userInfoCurrent = userInfo?.roleCodes
userInfoCurrent.value = userInfo?.roleCodes?.toLocaleString() userInfoCurrent.value = userInfo?.roleCodes?.toLocaleString()
initShopList()
}) })
const useForm = Form.useForm const useForm = Form.useForm
@ -78,7 +86,7 @@ const props = withDefaults(
const emits = defineEmits<{ const emits = defineEmits<{
(e: 'search', params: Record<string, any>): void (e: 'search', params: Record<string, any>): void
}>() }>()
const shopList: any = ref([])
const searchTimeValue = ref<[Dayjs, Dayjs]>() const searchTimeValue = ref<[Dayjs, Dayjs]>()
const formModel = reactive<GeopoliticalCustomersSearch>({ const formModel = reactive<GeopoliticalCustomersSearch>({
customName: '', customName: '',
@ -88,6 +96,14 @@ const formModel = reactive<GeopoliticalCustomersSearch>({
const { resetFields } = useForm(formModel) const { resetFields } = useForm(formModel)
const initShopList = () => {
doRequest(getShopQueryAll(2), {
onSuccess: res => {
shopList.value = res.data
}
})
}
const search = () => { const search = () => {
const param = toRaw(formModel) const param = toRaw(formModel)
if (searchTimeValue.value && searchTimeValue.value.length == 2) { if (searchTimeValue.value && searchTimeValue.value.length == 2) {

@ -155,6 +155,10 @@ const columns: ProColumns[] = [
} }
} }
}, },
{
title: '承接销售',
dataIndex: 'userName'
},
{ {
title: '创建日期', title: '创建日期',
dataIndex: 'createTime', dataIndex: 'createTime',

@ -235,14 +235,16 @@ const initMap = () => {
} }
placeSearch.value = new AMap.PlaceSearch(placeOptions) placeSearch.value = new AMap.PlaceSearch(placeOptions)
}) })
autoComplete.value.on('select', (e: any) => { setTimeout(() => {
autoComplete.value?.on('select', (e: any) => {
placeSearch.value.setCity(e.poi.adcode) placeSearch.value.setCity(e.poi.adcode)
placeSearch.value.search(e.poi.name) placeSearch.value.search(e.poi.name)
}) })
placeSearch.value.on('markerClick', (e: any) => { placeSearch.value?.on('markerClick', (e: any) => {
formModel.address = `${e.data.pname}${e.data.cityname}${e.data.adname}${e.data.address}` formModel.address = `${e.data.pname}${e.data.cityname}${e.data.adname}${e.data.address}`
anchorData = { ...e.data } anchorData = { ...e.data }
}) })
}, 300)
map.value.addControl(geolocation) map.value.addControl(geolocation)
} }
@ -288,7 +290,6 @@ const handleSubmit = () => {
) )
}) })
} }
defineExpose({ defineExpose({
async open(newFormAction: FormAction, record?: shopDetailVO) { async open(newFormAction: FormAction, record?: shopDetailVO) {
await selectUserList() await selectUserList()

@ -30,11 +30,13 @@ const props = defineProps(
) )
const emits = defineEmits<{ const emits = defineEmits<{
(e: 'update:value', selectedValue: SelectRoleValue): void (e: 'update:value', selectedValue: SelectRoleValue): Array<any>,
(e: 'changes', selectedValue: SelectRoleValue): Array<any>
}>() }>()
const onChange = (selectedValue: SelectValue) => { const onChange = (selectedValue: SelectValue) => {
emits('update:value', selectedValue as SelectRoleValue) emits('update:value', selectedValue as SelectRoleValue)
emits('changes', selectedValue as SelectRoleValue)
} }
const filterOption = (input: string, option: any) => { const filterOption = (input: string, option: any) => {

@ -59,6 +59,7 @@
mode="multiple" mode="multiple"
allow-clear allow-clear
placeholder="请选择" placeholder="请选择"
@changes="updateRole"
/> />
</a-form-item> </a-form-item>
</a-col> </a-col>
@ -145,7 +146,11 @@ const handleSubmit = () => {
} }
) )
} }
const updateRole = () => {
if (formModel.roleCodes.length > 1) {
formModel.roleCodes.splice(-1)
}
}
/* 弹窗关闭方法 */ /* 弹窗关闭方法 */
const handleClose = () => { const handleClose = () => {
closeModal() closeModal()

Loading…
Cancel
Save