提交 540b7ef0 authored 作者: lidongxu's avatar lidongxu

refactor(promotion/plan): 拆分促销计划组件独立完成

同上
上级 4c0b76d4
...@@ -14,4 +14,8 @@ VITE_APP_PROMOTION = '/promotion-api' # 促销 ...@@ -14,4 +14,8 @@ VITE_APP_PROMOTION = '/promotion-api' # 促销
# 飞书服务回调地址(本地测试已经通过并上线,后台飞书登录接口重定向地址已经不是 localhost 了所以本地开发无需使用飞书登录,线上已经可用) # 飞书服务回调地址(本地测试已经通过并上线,后台飞书登录接口重定向地址已经不是 localhost 了所以本地开发无需使用飞书登录,线上已经可用)
VITE_APP_REDIRECT_URL = 'http://localhost:8085' VITE_APP_REDIRECT_URL = 'http://localhost:8085'
# 积木报表服务地址 # 积木报表服务地址
VITE_APP_REPORT_URL = 'https://sfa-qa.wxl66.cn' VITE_APP_REPORT_URL = 'https://sfa-qa.wxl66.cn'
\ No newline at end of file
# 模板表格
VITE_APP_PLAN_TEMPLATE_EXCEL = 'https://link-promotion.oss-cn-shanghai.aliyuncs.com/file/%E6%96%B0%E5%A2%9E%E6%88%96%E4%BF%AE%E6%94%B9%E8%AE%A1%E5%88%92-%E6%A8%A1%E6%9D%BF3.0.xlsx'
\ No newline at end of file
...@@ -12,4 +12,10 @@ VITE_APP_PROMOTION = 'https://promotion.wxl66.cn' # 促销 ...@@ -12,4 +12,10 @@ VITE_APP_PROMOTION = 'https://promotion.wxl66.cn' # 促销
# 飞书服务回调地址 # 飞书服务回调地址
VITE_APP_REDIRECT_URL = 'https://sfa.wxl66.cn/link/' VITE_APP_REDIRECT_URL = 'https://sfa.wxl66.cn/link/'
# 积木报表服务地址 # 积木报表服务地址
VITE_APP_REPORT_URL = 'https://sfa.wxl66.cn' VITE_APP_REPORT_URL = 'https://sfa.wxl66.cn'
\ No newline at end of file
# 模板表格
VITE_APP_PLAN_TEMPLATE_EXCEL = 'https://link-promotion.oss-cn-shanghai.aliyuncs.com/file/%E6%96%B0%E5%A2%9E%E6%88%96%E4%BF%AE%E6%94%B9%E8%AE%A1%E5%88%92-%E6%A8%A1%E6%9D%BF3.0.xlsx'
\ No newline at end of file
...@@ -12,4 +12,10 @@ VITE_APP_PROMOTION = '/promotion-api' # 促销 ...@@ -12,4 +12,10 @@ VITE_APP_PROMOTION = '/promotion-api' # 促销
# 飞书服务回调地址 # 飞书服务回调地址
VITE_APP_REDIRECT_URL = 'https://sfa-qa.wxl66.cn/' VITE_APP_REDIRECT_URL = 'https://sfa-qa.wxl66.cn/'
# 积木报表服务地址 # 积木报表服务地址
VITE_APP_REPORT_URL = 'https://sfa-qa.wxl66.cn' VITE_APP_REPORT_URL = 'https://sfa-qa.wxl66.cn'
\ No newline at end of file
# 模板表格
VITE_APP_PLAN_TEMPLATE_EXCEL = 'https://link-promotion.oss-cn-shanghai.aliyuncs.com/file/%E6%96%B0%E5%A2%9E%E6%88%96%E4%BF%AE%E6%94%B9%E8%AE%A1%E5%88%92-%E6%A8%A1%E6%9D%BF3.0.xlsx'
\ No newline at end of file
...@@ -15,3 +15,19 @@ export const PROMOTION_STATUS = { ...@@ -15,3 +15,19 @@ export const PROMOTION_STATUS = {
export const getPromotionActiveStatus = (statusNum) => { export const getPromotionActiveStatus = (statusNum) => {
return PROMOTION_STATUS[statusNum] || { label: '未知状态', value: '' } return PROMOTION_STATUS[statusNum] || { label: '未知状态', value: '' }
} }
// 促销活动模式
export const PROMOTION_ACTIVITY_MODE_LIST = [
{
label: '单点CP',
value: '单点CP'
},
{
label: '常规MINI秀',
value: '常规MINI秀'
},
{
label: '校园活动',
value: '校园活动'
}
]
\ No newline at end of file
...@@ -108,6 +108,7 @@ export default defineStore( ...@@ -108,6 +108,7 @@ export default defineStore(
return { return {
empId: state.userInfo.userId, // 员工 id empId: state.userInfo.userId, // 员工 id
empNo: state.userInfo.userName, // 员工工号 empNo: state.userInfo.userName, // 员工工号
empName: state.userInfo.nickName, // 员工昵称名字
} }
}, },
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
start-placeholder="开始日期" start-placeholder="开始日期"
end-placeholder="结束日期" end-placeholder="结束日期"
:shortcuts="pickerOptions" :shortcuts="pickerOptions"
@change="getPlanList" /> @change="selActivityDate" />
</el-form-item> </el-form-item>
<el-form-item label="活动状态" <el-form-item label="活动状态"
prop="planStatus"> prop="planStatus">
...@@ -140,6 +140,7 @@ ...@@ -140,6 +140,7 @@
<script setup> <script setup>
import { getProCityAPI, getDealerListAPI, getWarZoneListAPI, getChargeListAPI } from '@/api' import { getProCityAPI, getDealerListAPI, getWarZoneListAPI, getChargeListAPI } from '@/api'
import { parseTime } from '@/utils'
import userStore from '@/store/modules/user' import userStore from '@/store/modules/user'
import { useDatePickerOptions } from '@/hooks' import { useDatePickerOptions } from '@/hooks'
import { PROMOTION_STATUS } from '@/dicts' import { PROMOTION_STATUS } from '@/dicts'
...@@ -163,6 +164,12 @@ const queryParams = reactive({ ...@@ -163,6 +164,12 @@ const queryParams = reactive({
}) })
/************* 选择日期 *************/ /************* 选择日期 *************/
const { recentPickerOptions: pickerOptions } = useDatePickerOptions() const { recentPickerOptions: pickerOptions } = useDatePickerOptions()
const selActivityDate = () => {
if (queryParams.activityDate?.length > 0) {
queryParams.activityDate = queryParams.activityDate.map(item => parseTime(item, '{y}-{m}-{d}'))
}
getPlanList()
}
/************* 选择状态 *************/ /************* 选择状态 *************/
const taskStatusList = ref(Object.values(PROMOTION_STATUS)) const taskStatusList = ref(Object.values(PROMOTION_STATUS))
......
差异被折叠。
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论