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

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

同上
上级 f60217cd
......@@ -88,7 +88,7 @@ defineOptions({
import userStore from '@/store/modules/user'
import { parseTime } from '@/utils'
import { checkPlanExpire } from '@/hooks'
import { getPromotionActiveStatus } from '@/dicts'
import { PROMOTION_STATUS,getPromotionActiveStatus } from '@/dicts'
import { getPlanListAPI, deletePlanAPI, batchUpdatePlanAPI, getChargeListAPI } from '@/api'
import PlanSearch from './planSearch.vue'
import PickerBelong from '../components/PickerBelong'
......@@ -120,16 +120,12 @@ const loading = ref(false)
const finished = ref(false)
// 活动状态
const planColumns = [
{
text: '未执行',
value: 'NOT_EXECUTION'
},
{
text: '执行',
value: 'EXECUTION'
const planColumns = Object.values(PROMOTION_STATUS).map(item => {
return {
text: item.label,
value: item.value
}
]
})
// 归属人
const allEmpolyeeList = ref([])
......@@ -157,7 +153,8 @@ const getPlanList = async () => {
activityEndDate: parseTime(query.activityEndDate, "{y}-{m}-{d}"),
planStatus: planColumns.find(item => item.text === query.planStatus)?.value,
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 @@
placeholder="请输入店铺名"
@update:model-value="searchByStoreName"
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"
class="reset-btn"
......@@ -144,10 +155,10 @@ const confirmPlan = (val) => {
const showEmployee = ref(false)
// 如果是城市经理,设置默认归属人
watch(() => props.allEmpolyeeList, (newVal) => {
if (newVal.length > 0 && promotionIdentity.value) {
if (newVal.length > 0 && promotionIdentity.value) {
props.query.employeeName = newVal.find(o => o.employeeNo === userStore().employeeNo)?.text
props.query.employeeId = newVal.find(o => o.employeeNo === userStore().employeeNo)?.value
}
}
})
// 确定归属人
......@@ -160,7 +171,12 @@ const onEmployeeConfirm = (val) => {
// 店铺名
const searchByStoreName = (val) => {
props.query.storeNameLike = val
// props.query.storeNameLike = val
emits('query')
}
// 计划状态
const selIsDeleted = () => {
emits('query')
}
......@@ -172,9 +188,10 @@ const resetFn = () => {
props.query.planStatus = undefined
if (!promotionIdentity.value) {
props.query.employeeName = undefined
props.query.employeeId = undefined
props.query.employeeId = undefined
}
props.query.storeNameLike = undefined
props.query.isDeleted = undefined
emits('query')
}
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论