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