提交 7424ff96 authored 作者: lidongxu's avatar lidongxu

feat(mobile/plan): 新增筛选 已删除计划列表功能

同上
上级 f60217cd
...@@ -88,7 +88,7 @@ defineOptions({ ...@@ -88,7 +88,7 @@ defineOptions({
import userStore from '@/store/modules/user' import userStore from '@/store/modules/user'
import { parseTime } from '@/utils' import { parseTime } from '@/utils'
import { checkPlanExpire } from '@/hooks' import { checkPlanExpire } from '@/hooks'
import { getPromotionActiveStatus } from '@/dicts' import { PROMOTION_STATUS,getPromotionActiveStatus } from '@/dicts'
import { getPlanListAPI, deletePlanAPI, batchUpdatePlanAPI, getChargeListAPI } from '@/api' import { getPlanListAPI, deletePlanAPI, batchUpdatePlanAPI, getChargeListAPI } from '@/api'
import PlanSearch from './planSearch.vue' import PlanSearch from './planSearch.vue'
import PickerBelong from '../components/PickerBelong' import PickerBelong from '../components/PickerBelong'
...@@ -120,16 +120,12 @@ const loading = ref(false) ...@@ -120,16 +120,12 @@ const loading = ref(false)
const finished = ref(false) const finished = ref(false)
// 活动状态 // 活动状态
const planColumns = [ const planColumns = Object.values(PROMOTION_STATUS).map(item => {
{ return {
text: '未执行', text: item.label,
value: 'NOT_EXECUTION' value: item.value
},
{
text: '执行',
value: 'EXECUTION'
} }
] })
// 归属人 // 归属人
const allEmpolyeeList = ref([]) const allEmpolyeeList = ref([])
...@@ -157,7 +153,8 @@ const getPlanList = async () => { ...@@ -157,7 +153,8 @@ const getPlanList = async () => {
activityEndDate: parseTime(query.activityEndDate, "{y}-{m}-{d}"), activityEndDate: parseTime(query.activityEndDate, "{y}-{m}-{d}"),
planStatus: planColumns.find(item => item.text === query.planStatus)?.value, planStatus: planColumns.find(item => item.text === query.planStatus)?.value,
employeeId: promotionIdentity.value ? allEmpolyeeList.value.find(o => o.employeeNo === employeeNo.value)?.value : query.employeeId, employeeId: promotionIdentity.value ? allEmpolyeeList.value.find(o => o.employeeNo === employeeNo.value)?.value : query.employeeId,
storeNameLike: query.storeNameLike storeNameLike: query.storeNameLike,
statusType: query.isDeleted
}, },
}) })
......
...@@ -60,6 +60,17 @@ ...@@ -60,6 +60,17 @@
placeholder="请输入店铺名" placeholder="请输入店铺名"
@update:model-value="searchByStoreName" @update:model-value="searchByStoreName"
clearable /> clearable />
<!-- 查看有效/已删除计划 -->
<van-field label="计划状态">
<template #input>
<van-radio-group v-model="query.isDeleted" @change="selIsDeleted">
<van-radio :name="undefined">有效</van-radio>
<van-radio name="INVALID">已删除</van-radio>
</van-radio-group>
</template>
</van-field>
<!-- 重置按钮 --> <!-- 重置按钮 -->
<van-button icon="replay" <van-button icon="replay"
class="reset-btn" class="reset-btn"
...@@ -160,7 +171,12 @@ const onEmployeeConfirm = (val) => { ...@@ -160,7 +171,12 @@ const onEmployeeConfirm = (val) => {
// 店铺名 // 店铺名
const searchByStoreName = (val) => { const searchByStoreName = (val) => {
props.query.storeNameLike = val // props.query.storeNameLike = val
emits('query')
}
// 计划状态
const selIsDeleted = () => {
emits('query') emits('query')
} }
...@@ -175,6 +191,7 @@ const resetFn = () => { ...@@ -175,6 +191,7 @@ const resetFn = () => {
props.query.employeeId = undefined props.query.employeeId = undefined
} }
props.query.storeNameLike = undefined props.query.storeNameLike = undefined
props.query.isDeleted = undefined
emits('query') emits('query')
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论