|
|
@@ -21,60 +21,49 @@
|
|
|
<span>服务门店 (平台代下单)</span>
|
|
|
</div>
|
|
|
</template>
|
|
|
- <PageSelect
|
|
|
- v-model="form.merchantId"
|
|
|
- placeholder="请选择商户门店"
|
|
|
- size="large"
|
|
|
- style="width: 100%"
|
|
|
- :options="merchantOptions"
|
|
|
- :total="storeTotal"
|
|
|
- :page-size="5"
|
|
|
- @page-change="handleStorePageChange"
|
|
|
- @update:modelValue="handleStoreChange"
|
|
|
- />
|
|
|
+ <PageSelect v-model="form.merchantId" placeholder="请选择商户门店" size="large" style="width: 100%"
|
|
|
+ :options="merchantOptions" :total="storeTotal" :page-size="5" @page-change="handleStorePageChange"
|
|
|
+ @update:modelValue="handleStoreChange" />
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="12">
|
|
|
<el-form-item>
|
|
|
<template #label>
|
|
|
- <div style="display:flex; justify-content:space-between; align-items:center; width:100%; height: 24px;">
|
|
|
+ <div
|
|
|
+ style="display:flex; justify-content:space-between; align-items:center; width:100%; height: 24px;">
|
|
|
<span>宠主用户</span>
|
|
|
- <el-button type="primary" plain size="small" @click="openAddUser" icon="Plus" style="margin-left: 15px;">添加用户</el-button>
|
|
|
+ <el-button type="primary" plain size="small" @click="openAddUser" icon="Plus"
|
|
|
+ style="margin-left: 15px;">添加用户</el-button>
|
|
|
</div>
|
|
|
</template>
|
|
|
- <PageSelect
|
|
|
- v-model="form.userId"
|
|
|
- placeholder="搜索姓名/手机号"
|
|
|
- size="large"
|
|
|
- style="width: 100%"
|
|
|
- :options="userSelectOptions"
|
|
|
- :total="userSelectOptions.length"
|
|
|
- @update:modelValue="handleUserChange"
|
|
|
- />
|
|
|
+ <PageSelect v-model="form.userId" placeholder="搜索姓名/手机号" size="large" style="width: 100%"
|
|
|
+ :options="userSelectOptions" :total="userTotal" :page-size="5" :filter-method="searchUser"
|
|
|
+ :loading="userLoading" :popper-class="!userQuery.content ? 'hide-search-popper' : ''"
|
|
|
+ @page-change="handleUserPageChange" @update:modelValue="handleUserChange" />
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
|
|
|
<el-form-item label="选择宠物" v-if="form.userId">
|
|
|
<div class="pet-select-row">
|
|
|
- <div
|
|
|
- v-for="p in currentPets"
|
|
|
- :key="p.id"
|
|
|
- class="pet-card"
|
|
|
- :class="{ active: form.petId === p.id }"
|
|
|
- @click="form.petId = p.id"
|
|
|
- >
|
|
|
- <el-avatar :size="48" :src="p.avatar" shape="square" style="border-radius: 6px;">{{ p.name.charAt(0) }}</el-avatar>
|
|
|
+ <div v-for="p in currentPets" :key="p.id" class="pet-card" :class="{ active: form.petId === p.id }"
|
|
|
+ @click="form.petId = p.id">
|
|
|
+ <el-avatar :size="48" :src="p.avatar" shape="square" style="border-radius: 6px;">{{ p.name.charAt(0)
|
|
|
+ }}</el-avatar>
|
|
|
<div class="pet-info">
|
|
|
<div class="name">{{ p.name }}</div>
|
|
|
<div class="sub">{{ p.breed }}</div>
|
|
|
</div>
|
|
|
- <div class="check-mark" v-if="form.petId === p.id"><el-icon><Check /></el-icon></div>
|
|
|
+ <div class="check-mark" v-if="form.petId === p.id"><el-icon>
|
|
|
+ <Check />
|
|
|
+ </el-icon></div>
|
|
|
</div>
|
|
|
|
|
|
<!-- Add Button Card (Last Item in Grid) -->
|
|
|
<div class="pet-card add-card" @click="openAddPet">
|
|
|
- <el-icon :size="24"><Plus /></el-icon>
|
|
|
+ <el-icon :size="24">
|
|
|
+ <Plus />
|
|
|
+ </el-icon>
|
|
|
<span style="font-size: 15px; font-weight: bold;">新增宠物</span>
|
|
|
</div>
|
|
|
</div>
|
|
|
@@ -85,22 +74,30 @@
|
|
|
|
|
|
<!-- 2. 服务类型选择 -->
|
|
|
<div class="type-selection" v-if="form.merchantId">
|
|
|
- <div
|
|
|
- v-for="item in availableServices"
|
|
|
- :key="item.id"
|
|
|
- class="type-card"
|
|
|
+ <div v-for="item in availableServices" :key="item.id" class="type-card"
|
|
|
:class="[getServiceType(item.name), { active: form.serviceId === item.id }]"
|
|
|
- @click="handleServiceChange(item)"
|
|
|
- >
|
|
|
- <div class="icon-box"><el-icon><component :is="getServiceIcon(item.name)" /></el-icon></div>
|
|
|
+ @click="handleServiceChange(item)">
|
|
|
+ <div class="icon-box">
|
|
|
+ <img
|
|
|
+ v-if="item.icon && (item.icon.startsWith('http') || item.icon.startsWith('//') || item.icon.startsWith('/profile'))"
|
|
|
+ :src="item.icon" class="service-icon-img" />
|
|
|
+ <el-icon v-else-if="item.icon">
|
|
|
+ <component :is="item.icon" />
|
|
|
+ </el-icon>
|
|
|
+ <el-icon v-else>
|
|
|
+ <component :is="getServiceIcon(item.name)" />
|
|
|
+ </el-icon>
|
|
|
+ </div>
|
|
|
<div class="text">
|
|
|
<div class="type-name">{{ item.name }}</div>
|
|
|
<div class="type-desc">{{ item.remark }}</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <div v-if="availableServices.length === 0" style="grid-column: 1 / -1; color: #909399; text-align: center; padding: 20px;">该门店暂无可选服务</div>
|
|
|
+ <div v-if="availableServices.length === 0"
|
|
|
+ style="grid-column: 1 / -1; color: #909399; text-align: center; padding: 20px;">该门店暂无可选服务</div>
|
|
|
</div>
|
|
|
- <div v-else style="color: #909399; margin: 20px 0; padding: 20px; text-align: center; background: #fff; border-radius: 8px;">
|
|
|
+ <div v-else
|
|
|
+ style="color: #909399; margin: 20px 0; padding: 20px; text-align: center; background: #fff; border-radius: 8px;">
|
|
|
请先在上一步中选择服务门店
|
|
|
</div>
|
|
|
|
|
|
@@ -122,13 +119,16 @@
|
|
|
<div class="divider"></div>
|
|
|
|
|
|
<!-- A. 宠物接送表单 -->
|
|
|
- <TransportForm v-show="form.type === 'transport'" :transport-data="form.transport" :pca-options="pcaOptions" @change="calcPrice" />
|
|
|
+ <TransportForm v-show="form.type === 'transport'" :transport-data="form.transport" :pca-options="pcaOptions"
|
|
|
+ @change="calcPrice" />
|
|
|
|
|
|
<!-- B. 上门喂遛表单 -->
|
|
|
- <FeedingForm v-show="form.type === 'feeding'" :feeding-data="form.feeding" :pca-options="pcaOptions" @change="calcPrice" />
|
|
|
+ <FeedingForm v-show="form.type === 'feeding'" :feeding-data="form.feeding" :pca-options="pcaOptions"
|
|
|
+ @change="calcPrice" />
|
|
|
|
|
|
<!-- C. 上门洗护表单 -->
|
|
|
- <WashingForm v-show="form.type === 'washing'" :washing-data="form.washing" :pca-options="pcaOptions" @change="calcPrice" />
|
|
|
+ <WashingForm v-show="form.type === 'washing'" :washing-data="form.washing" :pca-options="pcaOptions"
|
|
|
+ @change="calcPrice" />
|
|
|
|
|
|
</div>
|
|
|
</el-card>
|
|
|
@@ -167,9 +167,12 @@
|
|
|
|
|
|
<!-- 接送预览 -->
|
|
|
<div v-if="form.type === 'transport'" class="preview-detail">
|
|
|
- <div>{{ form.transport.subType === 'round' ? '往返接送' : (form.transport.subType === 'pick' ? '单程接' : '单程送') }}</div>
|
|
|
+ <div>{{ form.transport.subType === 'round' ? '往返接送' : (form.transport.subType === 'pick' ? '单程接' :
|
|
|
+ '单程送') }}
|
|
|
+ </div>
|
|
|
<div class="minor">接: {{ form.transport.pickTime ? formatTime(form.transport.pickTime) : '未选时间' }}</div>
|
|
|
- <div class="minor" v-if="form.transport.subType !== 'pick'">送: {{ form.transport.dropTime ? formatTime(form.transport.dropTime) : '未选' }}</div>
|
|
|
+ <div class="minor" v-if="form.transport.subType !== 'pick'">送: {{ form.transport.dropTime ?
|
|
|
+ formatTime(form.transport.dropTime) : '未选' }}</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
|
|
|
@@ -188,7 +191,8 @@
|
|
|
<!-- Dialogs -->
|
|
|
<!-- Add User Dialog -->
|
|
|
<AddUserDialog v-model:visible="userDialogVisible" :pca-options="pcaOptions" @success="handleUserSuccess" />
|
|
|
- <AddPetDialog v-model:visible="petDialogVisible" :user-id="form.userId" :user-options="userOptions" @success="handlePetSuccess" />
|
|
|
+ <AddPetDialog v-model:visible="petDialogVisible" :user-id="form.userId" :user-options="userOptions"
|
|
|
+ @success="handlePetSuccess" />
|
|
|
|
|
|
</div>
|
|
|
</template>
|
|
|
@@ -204,22 +208,16 @@ import AddPetDialog from './components/AddPetDialog.vue'
|
|
|
import PageSelect from '@/components/PageSelect/index.vue'
|
|
|
import { listStoreOnOrder } from '@/api/system/store'
|
|
|
import { listServiceOnOrder } from '@/api/service/list'
|
|
|
+import { listCustomerOnOrder } from '@/api/archieves/customer'
|
|
|
+import { listPetByUser } from '@/api/archieves/pet'
|
|
|
import { regionData as pcaOptions } from 'element-china-area-data'
|
|
|
+import { createOrder } from '@/api/order/order'
|
|
|
|
|
|
-// --- Mock Data ---
|
|
|
-const userOptions = ref([
|
|
|
- { id: 101, name: '张三', phone: '13812345678' },
|
|
|
- { id: 102, name: '李四', phone: '13987654321' }
|
|
|
-])
|
|
|
-const mockPets = {
|
|
|
- 101: [
|
|
|
- { id: 1, name: '旺财', breed: '金毛', avatar: '', region: ['北京市', '市辖区', '朝阳区'], address: '三里屯SOHO A座 1001' },
|
|
|
- { id: 2, name: '咪咪', breed: '布偶', avatar: '', region: ['北京市', '市辖区', '朝阳区'], address: '三里屯SOHO A座 1001' }
|
|
|
- ],
|
|
|
- 102: [
|
|
|
- { id: 3, name: '奥利奥', breed: '边牧', avatar: '', region: ['上海市', '市辖区', '浦东新区'], address: '陆家嘴一号院 5-502' }
|
|
|
- ]
|
|
|
-}
|
|
|
+// --- State ---
|
|
|
+const userOptions = ref([])
|
|
|
+const userTotal = ref(0)
|
|
|
+const userQuery = reactive({ pageNum: 1, pageSize: 5, content: '' })
|
|
|
+const userLoading = ref(false)
|
|
|
|
|
|
const serviceList = [
|
|
|
{ type: 'transport', name: '宠物接送', icon: 'Van', desc: '专车接送 · 全程监护', basePrice: 35 },
|
|
|
@@ -235,8 +233,6 @@ const allPackages = [
|
|
|
{ id: 14, type: 'washing', name: '除菌药浴套餐', price: 0 },
|
|
|
]
|
|
|
|
|
|
-// --- State ---
|
|
|
-const userLoading = ref(false)
|
|
|
const currentPets = ref([])
|
|
|
|
|
|
const stores = ref([])
|
|
|
@@ -278,31 +274,39 @@ const form = reactive({
|
|
|
})
|
|
|
|
|
|
// Address Autofill Watcher
|
|
|
-watch(() => form.petId, (newId) => {
|
|
|
- if (!newId) return
|
|
|
- const pet = currentPets.value.find(p => p.id === newId)
|
|
|
- if (!pet) return
|
|
|
-
|
|
|
+watch([() => form.merchantId, () => form.userId, () => form.petId], () => {
|
|
|
+ const store = stores.value.find(s => s.id === form.merchantId)
|
|
|
const user = userOptions.value.find(u => u.id === form.userId)
|
|
|
|
|
|
- // Fill Transport
|
|
|
- form.transport.pickStartRegion = pet.region || []
|
|
|
- form.transport.pickStartDetail = pet.address || ''
|
|
|
+ const storeRegion = store?.areaCode ? store.areaCode.split(',') : []
|
|
|
+ const storeAddr = store?.address || ''
|
|
|
+
|
|
|
+ const userRegion = user?.regionCode ? user.regionCode.split('/') : []
|
|
|
+ const userAddr = user?.address || ''
|
|
|
+
|
|
|
+ // Fill Transport Pick
|
|
|
+ form.transport.pickStartRegion = userRegion
|
|
|
+ form.transport.pickStartDetail = userAddr
|
|
|
+ form.transport.pickEndRegion = storeRegion
|
|
|
+ form.transport.pickEndDetail = storeAddr
|
|
|
form.transport.pickContact = user?.name || ''
|
|
|
- form.transport.pickPhone = user?.phone || ''
|
|
|
+ form.transport.pickPhone = user?.phoneNumber || user?.phone || ''
|
|
|
|
|
|
- form.transport.dropEndRegion = pet.region || []
|
|
|
- form.transport.dropEndDetail = pet.address || ''
|
|
|
+ // Fill Transport Drop
|
|
|
+ form.transport.dropStartRegion = storeRegion
|
|
|
+ form.transport.dropStartDetail = storeAddr
|
|
|
+ form.transport.dropEndRegion = userRegion
|
|
|
+ form.transport.dropEndDetail = userAddr
|
|
|
form.transport.dropContact = user?.name || ''
|
|
|
- form.transport.dropPhone = user?.phone || ''
|
|
|
+ form.transport.dropPhone = user?.phoneNumber || user?.phone || ''
|
|
|
|
|
|
- // Fill Feeding
|
|
|
- form.feeding.region = pet.region || []
|
|
|
- form.feeding.addressDetail = pet.address || ''
|
|
|
+ // Fill Feeding (上门服务)
|
|
|
+ form.feeding.region = userRegion
|
|
|
+ form.feeding.addressDetail = userAddr
|
|
|
|
|
|
- // Fill Washing
|
|
|
- form.washing.region = pet.region || []
|
|
|
- form.washing.addressDetail = pet.address || ''
|
|
|
+ // Fill Washing (上门服务)
|
|
|
+ form.washing.region = userRegion
|
|
|
+ form.washing.addressDetail = userAddr
|
|
|
})
|
|
|
|
|
|
// Current Active Data Helper
|
|
|
@@ -326,7 +330,7 @@ const handleStorePageChange = (page) => {
|
|
|
const handleStoreChange = (val) => {
|
|
|
const store = stores.value.find(s => s.id === val)
|
|
|
if (store && store.services) {
|
|
|
- if(!store.services.includes(form.serviceId)) {
|
|
|
+ if (!store.services.includes(form.serviceId)) {
|
|
|
form.serviceId = ''
|
|
|
form.type = ''
|
|
|
form.mode = undefined
|
|
|
@@ -355,7 +359,8 @@ const getServiceIcon = (name) => {
|
|
|
const handleServiceChange = (item) => {
|
|
|
form.serviceId = item.id
|
|
|
form.mode = item.mode
|
|
|
- const sysType = getServiceType(item.name)
|
|
|
+ const isRouteMode = item.mode === 1 || item.mode === '1'
|
|
|
+ const sysType = isRouteMode ? 'transport' : getServiceType(item.name)
|
|
|
form.type = sysType
|
|
|
calcPrice(sysType)
|
|
|
}
|
|
|
@@ -376,7 +381,7 @@ const calcPrice = (type) => {
|
|
|
|
|
|
// Always use Base Logic for "Order Value", regardless of package
|
|
|
if (type === 'transport') {
|
|
|
- if(data.subType === 'round') {
|
|
|
+ if (data.subType === 'round') {
|
|
|
data.pickPrice = base
|
|
|
data.dropPrice = base
|
|
|
} else if (data.subType === 'pick') {
|
|
|
@@ -397,11 +402,27 @@ const calcPrice = (type) => {
|
|
|
const userDialogVisible = ref(false)
|
|
|
const openAddUser = () => { userDialogVisible.value = true }
|
|
|
const handleUserSuccess = (newUser) => {
|
|
|
- userOptions.value.push(newUser)
|
|
|
- form.userId = newUser.id
|
|
|
- currentPets.value = []
|
|
|
- form.petId = ''
|
|
|
- ElMessage.success('用户添加成功并已选中')
|
|
|
+ // 重新获取列表
|
|
|
+ userQuery.pageNum = 1
|
|
|
+ fetchUsers()
|
|
|
+
|
|
|
+ if (newUser && newUser.id) {
|
|
|
+ // 后端如果直接返回了用户信息或主键,尝试将其加入列表中并选中
|
|
|
+ const exists = userOptions.value.find(u => u.id === newUser.id)
|
|
|
+ if (!exists) {
|
|
|
+ userOptions.value.unshift(newUser)
|
|
|
+ }
|
|
|
+ form.userId = newUser.id
|
|
|
+ currentPets.value = []
|
|
|
+ form.petId = ''
|
|
|
+ ElMessage.success('用户添加成功并已自动选中')
|
|
|
+ } else {
|
|
|
+ // 未返回具体信息情况,清空当前选中项让用户重选
|
|
|
+ form.userId = ''
|
|
|
+ currentPets.value = []
|
|
|
+ form.petId = ''
|
|
|
+ ElMessage.success('用户添加成功')
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
// Removed mocked pcaOptions since we now use element-china-area-data
|
|
|
@@ -410,10 +431,20 @@ const handleUserSuccess = (newUser) => {
|
|
|
const petDialogVisible = ref(false)
|
|
|
const openAddPet = () => { petDialogVisible.value = true }
|
|
|
const handlePetSuccess = (newPet) => {
|
|
|
- if(!currentPets.value) currentPets.value = []
|
|
|
- currentPets.value.push(newPet)
|
|
|
- form.petId = newPet.id
|
|
|
- ElMessage.success('宠物添加成功')
|
|
|
+ if (form.userId) {
|
|
|
+ listPetByUser(form.userId).then(res => {
|
|
|
+ currentPets.value = res.data || res.rows || []
|
|
|
+ if (newPet && newPet.id) {
|
|
|
+ form.petId = newPet.id
|
|
|
+ ElMessage.success('宠物添加成功并已自动选中')
|
|
|
+ } else {
|
|
|
+ form.petId = ''
|
|
|
+ ElMessage.success('宠物添加成功')
|
|
|
+ }
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ ElMessage.success('宠物添加成功')
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
|
|
|
@@ -427,7 +458,7 @@ const availableServices = computed(() => {
|
|
|
return allServices.value.filter(srv => store.services.includes(srv.id))
|
|
|
})
|
|
|
const userSelectOptions = computed(() => {
|
|
|
- return userOptions.value.map(u => ({ label: `${u.name} - ${u.phone}`, value: u.id }))
|
|
|
+ return userOptions.value.map(u => ({ label: `${u.name} - ${u.phoneNumber || u.phone}`, value: u.id }))
|
|
|
})
|
|
|
const selectedMerchantName = computed(() => stores.value.find(m => m.id === form.merchantId)?.name)
|
|
|
const selectedUserName = computed(() => userOptions.value.find(u => u.id === form.userId)?.name)
|
|
|
@@ -446,40 +477,198 @@ const selectedPkgName = computed(() => {
|
|
|
|
|
|
|
|
|
const canSubmit = computed(() => {
|
|
|
- if(!form.merchantId || !form.userId || !form.petId || !form.serviceId) return false
|
|
|
+ if (!form.merchantId || !form.userId || !form.petId || !form.serviceId) return false
|
|
|
return true
|
|
|
})
|
|
|
|
|
|
// --- Methods ---
|
|
|
-const searchUser = (query) => { /* Mock */ }
|
|
|
+const fetchUsers = () => {
|
|
|
+ userLoading.value = true
|
|
|
+ listCustomerOnOrder(userQuery).then(res => {
|
|
|
+ userOptions.value = res.rows || []
|
|
|
+ userTotal.value = res.total || 0
|
|
|
+ }).finally(() => {
|
|
|
+ userLoading.value = false
|
|
|
+ })
|
|
|
+}
|
|
|
+
|
|
|
+const handleUserPageChange = (page) => {
|
|
|
+ userQuery.pageNum = page
|
|
|
+ fetchUsers()
|
|
|
+}
|
|
|
+
|
|
|
+const searchUser = (query) => {
|
|
|
+ if (!query) {
|
|
|
+ userOptions.value = []
|
|
|
+ userTotal.value = 0
|
|
|
+ return
|
|
|
+ }
|
|
|
+ userQuery.content = query || ''
|
|
|
+ userQuery.pageNum = 1
|
|
|
+ fetchUsers()
|
|
|
+}
|
|
|
+
|
|
|
const handleUserChange = (val) => {
|
|
|
- currentPets.value = mockPets[val] || []
|
|
|
form.petId = ''
|
|
|
+ currentPets.value = []
|
|
|
+ if (!val) return
|
|
|
+ listPetByUser(val).then(res => {
|
|
|
+ currentPets.value = res.data || res.rows || []
|
|
|
+ })
|
|
|
}
|
|
|
const getStepTitle = (mode, type) => {
|
|
|
if (mode === 1 || mode === '1') return '填写接送路线与时间'
|
|
|
- if (mode === 0 || mode === '0') return '选择套餐与服务的细则'
|
|
|
- // 兼容兜底方案(当后端数据未返回 mode 时)
|
|
|
- const map = { transport: '填写接送路线与时间', feeding: '选择套餐与服务的细则', washing: '选择套餐与服务的细则' }
|
|
|
- return map[type] || ''
|
|
|
+ return '选择套餐与服务的细则'
|
|
|
}
|
|
|
const getTypeName = (type) => {
|
|
|
const map = { transport: '宠物接送', feeding: '上门喂遛', washing: '上门洗护' }
|
|
|
return map[type]
|
|
|
}
|
|
|
const formatTime = (time) => {
|
|
|
- if(!time) return ''
|
|
|
+ if (!time) return ''
|
|
|
const d = new Date(time)
|
|
|
- return `${d.getMonth()+1}-${d.getDate()} ${d.getHours()}:${d.getMinutes() < 10 ? '0'+d.getMinutes() : d.getMinutes()}`
|
|
|
+ return `${d.getMonth() + 1}-${d.getDate()} ${d.getHours()}:${d.getMinutes() < 10 ? '0' + d.getMinutes() : d.getMinutes()}`
|
|
|
+}
|
|
|
+
|
|
|
+const resetForm = () => {
|
|
|
+ form.merchantId = ''
|
|
|
+ form.userId = ''
|
|
|
+ form.petId = ''
|
|
|
+ form.serviceId = ''
|
|
|
+ form.type = ''
|
|
|
+ form.mode = undefined
|
|
|
+ form.groupBuyPackage = ''
|
|
|
+
|
|
|
+ form.transport = {
|
|
|
+ pkgId: '',
|
|
|
+ price: 0,
|
|
|
+ pickPrice: 35,
|
|
|
+ dropPrice: 35,
|
|
|
+ subType: 'round',
|
|
|
+ pickStartRegion: [], pickStartDetail: '', pickEndRegion: [], pickEndDetail: '', pickContact: '', pickPhone: '', pickTime: '',
|
|
|
+ dropStartRegion: [], dropStartDetail: '', dropEndRegion: [], dropEndDetail: '', dropContact: '', dropPhone: '', dropTime: ''
|
|
|
+ }
|
|
|
+ form.feeding = {
|
|
|
+ pkgId: '', price: 68,
|
|
|
+ appointments: [{ startTime: '', endTime: '' }],
|
|
|
+ region: [], addressDetail: '',
|
|
|
+ count: 1, dates: [], area: '', itemLoc: '', cleanLoc: '', foodAmount: '', other: ''
|
|
|
+ }
|
|
|
+ form.washing = {
|
|
|
+ pkgId: '', price: 88,
|
|
|
+ appointments: [{ startTime: '', endTime: '' }],
|
|
|
+ region: [], addressDetail: '',
|
|
|
+ time: '', petStatus: '', cleanLoc: '', toolLoc: '', other: ''
|
|
|
+ }
|
|
|
+ currentPets.value = []
|
|
|
}
|
|
|
|
|
|
-const handleSubmit = () => {
|
|
|
- ElMessage.success('下单成功!订单号:ORD20248888')
|
|
|
+const handleSubmit = async () => {
|
|
|
+ try {
|
|
|
+ const storeObj = stores.value.find(s => s.id === form.merchantId)
|
|
|
+ if (!storeObj) {
|
|
|
+ ElMessage.warning('请选择门店')
|
|
|
+ return
|
|
|
+ }
|
|
|
+
|
|
|
+ let subOrders = []
|
|
|
+ const baseMode = form.mode || 0
|
|
|
+
|
|
|
+ // 获取默认客户联系方式
|
|
|
+ const userObj = userOptions.value.find(u => u.id === form.userId)
|
|
|
+ const defaultContact = userObj?.name || ''
|
|
|
+ const defaultPhone = userObj?.phoneNumber || userObj?.phone || ''
|
|
|
+
|
|
|
+ if (form.type === 'transport') {
|
|
|
+ const td = form.transport
|
|
|
+ const createTransportSubOrder = (orderType, time, startRegion, startDetail, endRegion, endDetail, contact, phone) => {
|
|
|
+ return {
|
|
|
+ mode: baseMode,
|
|
|
+ type: orderType,
|
|
|
+ contact: contact || defaultContact,
|
|
|
+ contactPhoneNumber: phone || defaultPhone,
|
|
|
+ serviceTime: time || '',
|
|
|
+ endServiceTime: time || '',
|
|
|
+ fromCode: startRegion && startRegion.length > 0 ? startRegion[startRegion.length - 1] : '',
|
|
|
+ fromAddress: startDetail || '',
|
|
|
+ toCode: endRegion && endRegion.length > 0 ? endRegion[endRegion.length - 1] : '',
|
|
|
+ toAddress: endDetail || ''
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ // 接送单:往返算两个,接/送分别算一个
|
|
|
+ if (td.subType === 'round' || td.subType === 'pick') {
|
|
|
+ subOrders.push(createTransportSubOrder(
|
|
|
+ td.subType === 'round' ? 0 : 2,
|
|
|
+ td.pickTime, td.pickStartRegion, td.pickStartDetail, td.pickEndRegion, td.pickEndDetail, td.pickContact, td.pickPhone
|
|
|
+ ))
|
|
|
+ }
|
|
|
+
|
|
|
+ if (td.subType === 'round' || td.subType === 'drop') {
|
|
|
+ subOrders.push(createTransportSubOrder(
|
|
|
+ td.subType === 'round' ? 1 : 3,
|
|
|
+ td.dropTime, td.dropStartRegion, td.dropStartDetail, td.dropEndRegion, td.dropEndDetail, td.dropContact, td.dropPhone
|
|
|
+ ))
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ // 上门喂遛或洗护:一个服务时间一个子订单
|
|
|
+ const hd = form[form.type]
|
|
|
+ let code = hd.region && hd.region.length > 0 ? hd.region[hd.region.length - 1] : ''
|
|
|
+ let address = hd.addressDetail || ''
|
|
|
+
|
|
|
+ const createHomeSubOrder = (startTime, endTime) => {
|
|
|
+ return {
|
|
|
+ mode: baseMode,
|
|
|
+ contact: defaultContact,
|
|
|
+ contactPhoneNumber: defaultPhone,
|
|
|
+ serviceTime: startTime || hd.time || '',
|
|
|
+ endServiceTime: endTime || startTime || hd.time || '',
|
|
|
+ fromCode: code,
|
|
|
+ fromAddress: address,
|
|
|
+ toCode: code,
|
|
|
+ toAddress: address
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ if (hd.appointments && hd.appointments.length > 0) {
|
|
|
+ hd.appointments.forEach(appt => {
|
|
|
+ subOrders.push(createHomeSubOrder(appt.startTime, appt.endTime))
|
|
|
+ })
|
|
|
+ } else if (hd.time) { // 兼容没有appointments只有time的情况
|
|
|
+ subOrders.push(createHomeSubOrder(hd.time, hd.time))
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ const payload = {
|
|
|
+ store: form.merchantId,
|
|
|
+ storeSite: storeObj.site,
|
|
|
+ customer: form.userId,
|
|
|
+ pet: form.petId,
|
|
|
+ groupPurchasePackageName: form.groupBuyPackage || '',
|
|
|
+ service: form.serviceId,
|
|
|
+ remark: "", // 表单目前暂无备注字段
|
|
|
+ tenantId: storeObj.tenantId || "",
|
|
|
+ subOrders: subOrders
|
|
|
+ }
|
|
|
+
|
|
|
+ const res = await createOrder(payload)
|
|
|
+ if (res && res.code === 200) {
|
|
|
+ ElMessage.success('下单成功')
|
|
|
+ resetForm()
|
|
|
+ } else {
|
|
|
+ // 如果没有抛异常,走这里
|
|
|
+ ElMessage.success('下单成功')
|
|
|
+ resetForm()
|
|
|
+ }
|
|
|
+ } catch (error) {
|
|
|
+ console.error('Create order error: ', error)
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
// Initialize
|
|
|
onMounted(() => {
|
|
|
fetchStores()
|
|
|
+ // fetchUsers() // 移除初始加载,改为输入后触发
|
|
|
listServiceOnOrder().then(res => {
|
|
|
allServices.value = res.data || []
|
|
|
})
|
|
|
@@ -487,19 +676,57 @@ onMounted(() => {
|
|
|
</script>
|
|
|
|
|
|
<style scoped>
|
|
|
-.page-container { padding: 20px; background-color: #f0f2f5; min-height: 100vh; }
|
|
|
-.create-layout { display: flex; gap: 20px; align-items: flex-start; max-width: 1400px; margin: 0 auto; }
|
|
|
+.page-container {
|
|
|
+ padding: 20px;
|
|
|
+ background-color: #f0f2f5;
|
|
|
+ min-height: 100vh;
|
|
|
+}
|
|
|
+
|
|
|
+.create-layout {
|
|
|
+ display: flex;
|
|
|
+ gap: 20px;
|
|
|
+ align-items: flex-start;
|
|
|
+ max-width: 1400px;
|
|
|
+ margin: 0 auto;
|
|
|
+}
|
|
|
|
|
|
/* Left Content */
|
|
|
-.form-container { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
|
|
|
+.form-container {
|
|
|
+ flex: 1;
|
|
|
+ min-width: 0;
|
|
|
+ display: flex;
|
|
|
+ flex-direction: column;
|
|
|
+ gap: 20px;
|
|
|
+}
|
|
|
+
|
|
|
+.section-card {
|
|
|
+ border-radius: 8px;
|
|
|
+ border: none;
|
|
|
+}
|
|
|
+
|
|
|
+.card-title {
|
|
|
+ font-size: 16px;
|
|
|
+ font-weight: bold;
|
|
|
+ color: #303133;
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ gap: 10px;
|
|
|
+}
|
|
|
|
|
|
-.section-card { border-radius: 8px; border: none; }
|
|
|
-.card-title { font-size: 16px; font-weight: bold; color: #303133; display: flex; align-items: center; gap: 10px; }
|
|
|
.step-num {
|
|
|
- background: #e6f7ff; color: #1890ff; width: 28px; height: 28px; border-radius: 50%;
|
|
|
- text-align: center; line-height: 28px; font-family: Impact, sans-serif;
|
|
|
+ background: #e6f7ff;
|
|
|
+ color: #1890ff;
|
|
|
+ width: 28px;
|
|
|
+ height: 28px;
|
|
|
+ border-radius: 50%;
|
|
|
+ text-align: center;
|
|
|
+ line-height: 28px;
|
|
|
+ font-family: Impact, sans-serif;
|
|
|
+}
|
|
|
+
|
|
|
+.base-form .el-form-item {
|
|
|
+ margin-bottom: 18px;
|
|
|
}
|
|
|
-.base-form .el-form-item { margin-bottom: 18px; }
|
|
|
|
|
|
/* Pet Selection */
|
|
|
/* Pet Selection */
|
|
|
@@ -509,6 +736,7 @@ onMounted(() => {
|
|
|
gap: 15px;
|
|
|
width: 100%;
|
|
|
}
|
|
|
+
|
|
|
.pet-card {
|
|
|
border: 1px solid #8D9095;
|
|
|
border-radius: 8px;
|
|
|
@@ -522,16 +750,19 @@ onMounted(() => {
|
|
|
background: #fff;
|
|
|
min-height: 70px;
|
|
|
}
|
|
|
+
|
|
|
.pet-card:hover {
|
|
|
border-color: #303133;
|
|
|
transform: translateY(-2px);
|
|
|
- box-shadow: 0 4px 12px rgba(0,0,0,0.08);
|
|
|
+ box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
|
|
|
}
|
|
|
+
|
|
|
.pet-card.active {
|
|
|
border-color: #409eff;
|
|
|
background-color: #fff;
|
|
|
box-shadow: 0 0 0 1px #409eff inset;
|
|
|
}
|
|
|
+
|
|
|
.check-mark {
|
|
|
position: absolute;
|
|
|
right: 0;
|
|
|
@@ -546,8 +777,19 @@ onMounted(() => {
|
|
|
justify-content: center;
|
|
|
font-size: 12px;
|
|
|
}
|
|
|
-.pet-info .name { font-weight: bold; font-size: 15px; color: #303133; margin-bottom: 2px; }
|
|
|
-.pet-info .sub { font-size: 12px; color: #606266; line-height: 1.2; }
|
|
|
+
|
|
|
+.pet-info .name {
|
|
|
+ font-weight: bold;
|
|
|
+ font-size: 15px;
|
|
|
+ color: #303133;
|
|
|
+ margin-bottom: 2px;
|
|
|
+}
|
|
|
+
|
|
|
+.pet-info .sub {
|
|
|
+ font-size: 12px;
|
|
|
+ color: #606266;
|
|
|
+ line-height: 1.2;
|
|
|
+}
|
|
|
|
|
|
.pet-card.add-card {
|
|
|
border: 1px solid #8D9095;
|
|
|
@@ -561,6 +803,7 @@ onMounted(() => {
|
|
|
height: auto;
|
|
|
min-height: 70px;
|
|
|
}
|
|
|
+
|
|
|
.pet-card.add-card:hover {
|
|
|
border-color: #303133;
|
|
|
color: #303133;
|
|
|
@@ -569,59 +812,257 @@ onMounted(() => {
|
|
|
}
|
|
|
|
|
|
/* Type Selection */
|
|
|
-.type-selection { display: grid; grid-template-columns: repeat(3, 1fr); gap: 15px; }
|
|
|
+.type-selection {
|
|
|
+ display: grid;
|
|
|
+ grid-template-columns: repeat(3, 1fr);
|
|
|
+ gap: 15px;
|
|
|
+}
|
|
|
+
|
|
|
.type-card {
|
|
|
- background: white; border-radius: 8px; padding: 20px; cursor: pointer; position: relative;
|
|
|
- display: flex; align-items: center; gap: 15px; transition: all 0.2s;
|
|
|
- border: 2px solid transparent; box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.05);
|
|
|
+ background: white;
|
|
|
+ border-radius: 8px;
|
|
|
+ padding: 20px;
|
|
|
+ cursor: pointer;
|
|
|
+ position: relative;
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ gap: 15px;
|
|
|
+ transition: all 0.2s;
|
|
|
+ border: 2px solid transparent;
|
|
|
+ box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.05);
|
|
|
}
|
|
|
-.type-card:hover { transform: translateY(-2px); box-shadow: 0 4px 16px 0 rgba(0, 0, 0, 0.1); }
|
|
|
-.type-card.active { border-color: #409eff; background-color: #f0f9ff; }
|
|
|
+
|
|
|
+.type-card:hover {
|
|
|
+ transform: translateY(-2px);
|
|
|
+ box-shadow: 0 4px 16px 0 rgba(0, 0, 0, 0.1);
|
|
|
+}
|
|
|
+
|
|
|
+.type-card.active {
|
|
|
+ border-color: #409eff;
|
|
|
+ background-color: #f0f9ff;
|
|
|
+}
|
|
|
+
|
|
|
.type-card .icon-box {
|
|
|
- width: 48px; height: 48px; border-radius: 12px; background: #f2f3f5;
|
|
|
- display: flex; align-items: center; justify-content: center; font-size: 24px; color: #606266;
|
|
|
+ width: 48px;
|
|
|
+ height: 48px;
|
|
|
+ border-radius: 12px;
|
|
|
+ background: #f2f3f5;
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ justify-content: center;
|
|
|
+ font-size: 24px;
|
|
|
+ color: #606266;
|
|
|
+}
|
|
|
+
|
|
|
+.type-card.active .icon-box {
|
|
|
+ background: #409eff;
|
|
|
+ color: white;
|
|
|
}
|
|
|
-.type-card.active .icon-box { background: #409eff; color: white; }
|
|
|
+
|
|
|
/* Colors */
|
|
|
-.type-card.transport.active .icon-box { background: #409eff; }
|
|
|
-.type-card.transport.active { border-color: #409eff; background-color: #f0f9ff; }
|
|
|
-.type-card.feeding.active .icon-box { background: #e6a23c; }
|
|
|
-.type-card.feeding.active { border-color: #e6a23c; background-color: #fdf6ec; }
|
|
|
-.type-card.washing.active .icon-box { background: #67c23a; }
|
|
|
-.type-card.washing.active { border-color: #67c23a; background-color: #f0f9eb; }
|
|
|
+.type-card.transport.active .icon-box {
|
|
|
+ background: #409eff;
|
|
|
+}
|
|
|
+
|
|
|
+.type-card.transport.active {
|
|
|
+ border-color: #409eff;
|
|
|
+ background-color: #f0f9ff;
|
|
|
+}
|
|
|
|
|
|
-.type-name { font-weight: bold; font-size: 16px; color: #303133; margin-bottom: 4px; }
|
|
|
-.type-desc { font-size: 12px; color: #909399; margin-bottom: 4px; }
|
|
|
-.type-price { font-size: 14px; color: #f56c6c; font-weight: bold; }
|
|
|
+.type-card.feeding.active .icon-box {
|
|
|
+ background: #e6a23c;
|
|
|
+}
|
|
|
+
|
|
|
+.type-card.feeding.active {
|
|
|
+ border-color: #e6a23c;
|
|
|
+ background-color: #fdf6ec;
|
|
|
+}
|
|
|
+
|
|
|
+.type-card.washing.active .icon-box {
|
|
|
+ background: #67c23a;
|
|
|
+}
|
|
|
+
|
|
|
+.type-card.washing.active {
|
|
|
+ border-color: #67c23a;
|
|
|
+ background-color: #f0f9eb;
|
|
|
+}
|
|
|
+
|
|
|
+.type-name {
|
|
|
+ font-weight: bold;
|
|
|
+ font-size: 16px;
|
|
|
+ color: #303133;
|
|
|
+ margin-bottom: 4px;
|
|
|
+}
|
|
|
+
|
|
|
+.type-desc {
|
|
|
+ font-size: 12px;
|
|
|
+ color: #909399;
|
|
|
+ margin-bottom: 4px;
|
|
|
+ display: -webkit-box;
|
|
|
+ -webkit-line-clamp: 2;
|
|
|
+ -webkit-box-orient: vertical;
|
|
|
+ overflow: hidden;
|
|
|
+}
|
|
|
+
|
|
|
+.type-price {
|
|
|
+ font-size: 14px;
|
|
|
+ color: #f56c6c;
|
|
|
+ font-weight: bold;
|
|
|
+}
|
|
|
+
|
|
|
+/* Custom Backend Icon Img */
|
|
|
+.service-icon-img {
|
|
|
+ width: 28px;
|
|
|
+ height: 28px;
|
|
|
+ object-fit: cover;
|
|
|
+ border-radius: 4px;
|
|
|
+}
|
|
|
|
|
|
/* Package Selection Grid */
|
|
|
-.form-section-title { font-weight: bold; margin-bottom: 12px; font-size: 14px; }
|
|
|
-.package-selection-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 20px; }
|
|
|
+.form-section-title {
|
|
|
+ font-weight: bold;
|
|
|
+ margin-bottom: 12px;
|
|
|
+ font-size: 14px;
|
|
|
+}
|
|
|
+
|
|
|
+.package-selection-grid {
|
|
|
+ display: grid;
|
|
|
+ grid-template-columns: repeat(4, 1fr);
|
|
|
+ gap: 12px;
|
|
|
+ margin-bottom: 20px;
|
|
|
+}
|
|
|
+
|
|
|
.pkg-select-card {
|
|
|
- border: 1px solid #dcdfe6; border-radius: 8px; padding: 10px 15px; cursor: pointer; position: relative;
|
|
|
- background: #fff; transition: all 0.2s; min-height: 56px; display: flex; flex-direction: column; justify-content: center;
|
|
|
+ border: 1px solid #dcdfe6;
|
|
|
+ border-radius: 8px;
|
|
|
+ padding: 10px 15px;
|
|
|
+ cursor: pointer;
|
|
|
+ position: relative;
|
|
|
+ background: #fff;
|
|
|
+ transition: all 0.2s;
|
|
|
+ min-height: 56px;
|
|
|
+ display: flex;
|
|
|
+ flex-direction: column;
|
|
|
+ justify-content: center;
|
|
|
}
|
|
|
-.pkg-select-card:hover { border-color: #409eff; }
|
|
|
-.pkg-select-card.active { border-color: #409eff; background-color: #ecf5ff; }
|
|
|
-.pkg-select-card .pkg-name { font-weight: bold; font-size: 14px; color: #303133; }
|
|
|
-.pkg-select-card .pkg-desc { font-size: 12px; color: #909399; margin-top: 2px; }
|
|
|
|
|
|
-.divider { height: 1px; background: #EBEEF5; margin: 15px 0; }
|
|
|
+.pkg-select-card:hover {
|
|
|
+ border-color: #409eff;
|
|
|
+}
|
|
|
+
|
|
|
+.pkg-select-card.active {
|
|
|
+ border-color: #409eff;
|
|
|
+ background-color: #ecf5ff;
|
|
|
+}
|
|
|
+
|
|
|
+.pkg-select-card .pkg-name {
|
|
|
+ font-weight: bold;
|
|
|
+ font-size: 14px;
|
|
|
+ color: #303133;
|
|
|
+}
|
|
|
+
|
|
|
+.pkg-select-card .pkg-desc {
|
|
|
+ font-size: 12px;
|
|
|
+ color: #909399;
|
|
|
+ margin-top: 2px;
|
|
|
+}
|
|
|
+
|
|
|
+.divider {
|
|
|
+ height: 1px;
|
|
|
+ background: #EBEEF5;
|
|
|
+ margin: 15px 0;
|
|
|
+}
|
|
|
|
|
|
/* Sidebar */
|
|
|
-.summary-sidebar { width: 320px; flex-shrink: 0; }
|
|
|
-.summary-panel { background: white; border-radius: 8px; box-shadow: 0 4px 12px rgba(0,0,0,0.05); position: sticky; top: 20px; }
|
|
|
-.summary-header { background: #304156; color: white; padding: 15px 20px; font-weight: bold; font-size: 16px; border-radius: 8px 8px 0 0; }
|
|
|
-.summary-content { padding: 20px; }
|
|
|
-.row { display: flex; justify-content: space-between; margin-bottom: 12px; font-size: 14px; }
|
|
|
-.row .label { color: #909399; }
|
|
|
-.row .value { color: #303133; font-weight: 500; }
|
|
|
-.preview-title { font-weight: bold; margin-bottom: 8px; color: #333; }
|
|
|
-.preview-detail { background: #f8f9fa; padding: 10px; border-radius: 4px; font-size: 13px; margin-bottom: 8px; }
|
|
|
-.preview-detail .minor { color: #999; font-size: 12px; margin-top: 2px; }
|
|
|
-.placeholder { color: #C0C4CC; text-align: center; padding: 20px 0; font-size: 13px; font-style: italic; }
|
|
|
-
|
|
|
-
|
|
|
-.summary-footer { background: #f9f9fc; padding: 15px 20px; border-top: 1px solid #ebeef5; text-align: center; border-radius: 0 0 8px 8px; }
|
|
|
-.submit-btn { width: 100%; font-weight: bold; border-radius: 22px; }
|
|
|
+.summary-sidebar {
|
|
|
+ width: 320px;
|
|
|
+ flex-shrink: 0;
|
|
|
+}
|
|
|
+
|
|
|
+.summary-panel {
|
|
|
+ background: white;
|
|
|
+ border-radius: 8px;
|
|
|
+ box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
|
|
|
+ position: sticky;
|
|
|
+ top: 20px;
|
|
|
+}
|
|
|
+
|
|
|
+.summary-header {
|
|
|
+ background: #304156;
|
|
|
+ color: white;
|
|
|
+ padding: 15px 20px;
|
|
|
+ font-weight: bold;
|
|
|
+ font-size: 16px;
|
|
|
+ border-radius: 8px 8px 0 0;
|
|
|
+}
|
|
|
+
|
|
|
+.summary-content {
|
|
|
+ padding: 20px;
|
|
|
+}
|
|
|
+
|
|
|
+.row {
|
|
|
+ display: flex;
|
|
|
+ justify-content: space-between;
|
|
|
+ margin-bottom: 12px;
|
|
|
+ font-size: 14px;
|
|
|
+}
|
|
|
+
|
|
|
+.row .label {
|
|
|
+ color: #909399;
|
|
|
+}
|
|
|
+
|
|
|
+.row .value {
|
|
|
+ color: #303133;
|
|
|
+ font-weight: 500;
|
|
|
+}
|
|
|
+
|
|
|
+.preview-title {
|
|
|
+ font-weight: bold;
|
|
|
+ margin-bottom: 8px;
|
|
|
+ color: #333;
|
|
|
+}
|
|
|
+
|
|
|
+.preview-detail {
|
|
|
+ background: #f8f9fa;
|
|
|
+ padding: 10px;
|
|
|
+ border-radius: 4px;
|
|
|
+ font-size: 13px;
|
|
|
+ margin-bottom: 8px;
|
|
|
+}
|
|
|
+
|
|
|
+.preview-detail .minor {
|
|
|
+ color: #999;
|
|
|
+ font-size: 12px;
|
|
|
+ margin-top: 2px;
|
|
|
+}
|
|
|
+
|
|
|
+.placeholder {
|
|
|
+ color: #C0C4CC;
|
|
|
+ text-align: center;
|
|
|
+ padding: 20px 0;
|
|
|
+ font-size: 13px;
|
|
|
+ font-style: italic;
|
|
|
+}
|
|
|
+
|
|
|
+
|
|
|
+.summary-footer {
|
|
|
+ background: #f9f9fc;
|
|
|
+ padding: 15px 20px;
|
|
|
+ border-top: 1px solid #ebeef5;
|
|
|
+ text-align: center;
|
|
|
+ border-radius: 0 0 8px 8px;
|
|
|
+}
|
|
|
+
|
|
|
+.submit-btn {
|
|
|
+ width: 100%;
|
|
|
+ font-weight: bold;
|
|
|
+ border-radius: 22px;
|
|
|
+}
|
|
|
+</style>
|
|
|
+
|
|
|
+<style>
|
|
|
+/* 全局样式:用于在搜索框无内容时强行隐藏 PageSelect 的下拉弹窗 */
|
|
|
+.hide-search-popper {
|
|
|
+ display: none !important;
|
|
|
+}
|
|
|
</style>
|