【招生小程序】 新增# 招生老师和电销老师的总结记录

master
kaeery 2025-02-26 12:59:04 +08:00
parent dd67c9edb6
commit c395c9f641
15 changed files with 176 additions and 48 deletions

View File

@ -0,0 +1,65 @@
<template>
<view class="flex flex-col h-screen">
<w-navbarComp>
<template #left>
<view class="back-icon" @click="handleBack">
<TIcon name="icon-left" :size="30" />
</view>
</template>
<template #title>
<view class="w-4/5 flex items-center justify-center">
<date-picker :bindingDate="bindingDate" />
</view>
</template>
</w-navbarComp>
<view class="flex-1 overflow-auto px-[24rpx] pt-[24rpx] bg-[#F8F8F8]">
<!-- <z-paging
ref="paging"
v-model="dataList"
@query="queryList"
:fixed="false"
height="100%"
> -->
<summary-card v-for="(item, index) in cardList" :key="`unique-${index}`" :item="item" />
<!-- </z-paging> -->
</view>
</view>
</template>
<script setup lang="ts">
import { ref } from 'vue'
import summaryCard, { ISummaryCard } from './summary-card.vue'
import datePicker from '@/components/date-picker/date-picker.vue'
import { onLoad } from '@dcloudio/uni-app'
const cardList = ref<ISummaryCard[]>([
{
date: '2025-02-17 09:40',
templateItems: [
{ formType: 1, formTitle: '今日打电话数量(包括不接、挂、空)', value: '10' },
{ formType: 1, formTitle: '今日打出多少条有效数据(可以加微信)', value: '20' },
{ formType: 1, formTitle: '家长主动加我们微信数据', value: '30' },
{ formType: 1, formTitle: '有遇到什么问题', value: '无' }
]
},
{
date: '2025-02-17 09:40',
templateItems: [
{ formType: 1, formTitle: '今日打电话数量(包括不接、挂、空)', value: '10' },
{ formType: 1, formTitle: '今日打出多少条有效数据(可以加微信)', value: '20' },
{ formType: 1, formTitle: '家长主动加我们微信数据', value: '30' },
{ formType: 1, formTitle: '有遇到什么问题', value: '无' }
]
}
])
const handleBack = () => {
uni.navigateBack()
}
const bindingDate = ref()
const bindingType = ref('')
onLoad(option => {
bindingDate.value = option?.date || Date.now()
bindingType.value = option?.type || ''
})
</script>
<style scoped></style>

View File

@ -0,0 +1,32 @@
<template>
<w-card>
<template #title>
<text>{{ item.date }}</text>
</template>
<template #content>
<view class="flex flex-col gap-[16rpx]">
<view v-for="(data, index) in item.templateItems" :key="`unique_${index}`">
<text>{{ data.formTitle }}</text>
<text>{{ data.value }}</text>
</view>
</view>
</template>
</w-card>
</template>
<script setup lang="ts">
import { PropType } from 'vue'
import { ISummary } from '@/components/widgets/summary-form/summary-form.vue'
export interface ISummaryCard {
date: string
templateItems: ISummary[]
}
defineProps({
item: {
type: Object as PropType<ISummaryCard>,
default: () => ({})
}
})
</script>
<style scoped></style>

View File

@ -57,8 +57,6 @@ function handleToggle() {
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.filter { .filter {
margin-bottom: 30rpx;
.text { .text {
display: flex; display: flex;
align-items: center; align-items: center;

View File

@ -21,7 +21,7 @@
'date-strip__grid--active-text': curIndex == index 'date-strip__grid--active-text': curIndex == index
}" }"
> >
{{ item.text }}{{ item.index }} {{ item.text }}
</text> </text>
</view> </view>
</view> </view>

View File

@ -6,11 +6,7 @@
direction="horizontal" direction="horizontal"
:style="[styles]" :style="[styles]"
> >
<date-strip-item <date-strip-item :dates="displayWeeks[0].dates" @click="onClick" />
:dates="displayWeeks[0].dates"
:selectedDate="selectedDate"
@click="onClick"
/>
</scroll-view> </scroll-view>
</template> </template>

View File

@ -50,9 +50,5 @@ export default {
shape: { shape: {
type: String, type: String,
default: 'square' default: 'square'
},
selectedDate: {
type: [Date, String],
default: null
} }
} }

View File

@ -8,18 +8,26 @@
<view class="px-[24rpx] py-[16rpx] flex flex-col gap-[16rpx]"> <view class="px-[24rpx] py-[16rpx] flex flex-col gap-[16rpx]">
<slot name="content" /> <slot name="content" />
</view> </view>
<view class="px-[32rpx] border-t border-solid border-[#F3F3F3] flex justify-end py-[12rpx]"> <view
class="px-[32rpx] border-t border-solid border-[#F3F3F3] flex justify-end py-[12rpx]"
v-if="isSlotAction"
>
<slot name="action" /> <slot name="action" />
</view> </view>
</view> </view>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import { computed } from 'vue'
import { useSlots } from 'vue'
defineProps({ defineProps({
cardInfo: { cardInfo: {
type: Object, type: Object,
default: () => ({}) default: () => ({})
} }
}) })
const slots = useSlots()
const isSlotAction = computed(() => slots.action)
</script> </script>
<style scoped></style> <style scoped></style>

View File

@ -0,0 +1,32 @@
<template>
<view class="flex justify-between mb-[28rpx] px-[32rpx]">
<text>{{ parseDate }}</text>
<view class="flex gap-[8rpx] items-center text-primary text-[28rpx]" @click="handleMore">
<text>查看更多</text>
<TIcon name="icon-more" color="#0E66FB" :size="14" />
</view>
</view>
</template>
<script setup lang="ts">
import dayjs from 'dayjs'
import { computed } from 'vue'
const props = defineProps({
curDate: {
type: String,
default: new Date().getTime()
},
type: {
type: String,
default: ''
}
})
const parseDate = computed(() => dayjs(props.curDate).format('YYYY-MM'))
const handleMore = () => {
uni.navigateTo({
url: '/bundle/pages/summary-list/index?date=' + props.curDate + '&type=' + props.type
})
}
</script>
<style scoped></style>

View File

@ -1,26 +0,0 @@
<template>
<scroll-view
class="l-date-strip l-date-strip__scroll"
:scroll-x="true"
:scroll-left="scrollLeft"
:show-scrollbar="false"
direction="horizontal"
:style="[styles]"
v-if="switchMode == 'none'"
>
<l-date-strip-item
:dates="displayWeeks[0].dates"
:color="color"
:activeBgColor="activeBgColor"
:activeColor="activeColor"
:bgColor="bgColor"
:radius="radius"
:switchMode="switchMode"
:shape="shape"
@click="onClick"
></l-date-strip-item>
</scroll-view>
</template>
<script setup lang="ts"></script>
<style scoped></style>

View File

@ -10,7 +10,8 @@
<view class="statusBar" :style="{ paddingTop: statusBarHeight + 'px' }"></view> <view class="statusBar" :style="{ paddingTop: statusBarHeight + 'px' }"></view>
<view class="navBar" :style="barStyle"> <view class="navBar" :style="barStyle">
<slot name="left" /> <slot name="left" />
<view class="title" :style="setStyle">{{ title }}</view> <slot name="title" v-if="isSlotTitle" />
<view class="title" v-else :style="setStyle">{{ title }}</view>
</view> </view>
</view> </view>
</template> </template>
@ -43,6 +44,7 @@ const setStyle = computed(() => {
width: slots.left ? '80%' : '100%' width: slots.left ? '80%' : '100%'
} }
}) })
const isSlotTitle = computed(() => slots.title)
onLoad(() => { onLoad(() => {
const menuButtonInfo = uni.getMenuButtonBoundingClientRect() const menuButtonInfo = uni.getMenuButtonBoundingClientRect()
statusBarHeight.value = menuButtonInfo.top statusBarHeight.value = menuButtonInfo.top

View File

@ -23,7 +23,7 @@
</view> </view>
</view> </view>
</view> </view>
<view class="px-[60rpx] mt-[48rpx]"> <view class="px-[60rpx] mt-[48rpx]" v-if="readonly == ''">
<u-button class="btn" color="#0E66FB" shape="circle" @click="handleConfirm"> <u-button class="btn" color="#0E66FB" shape="circle" @click="handleConfirm">
确认 确认
</u-button> </u-button>
@ -43,6 +43,10 @@ defineProps({
modelValue: { modelValue: {
type: Array as PropType<ISummary[]>, type: Array as PropType<ISummary[]>,
default: () => [] default: () => []
},
readonly: {
type: String,
default: ''
} }
}) })
const emit = defineEmits(['handleConfirm']) const emit = defineEmits(['handleConfirm'])

View File

@ -120,6 +120,13 @@
{ {
"root": "bundle", "root": "bundle",
"pages": [ "pages": [
{
"path": "pages/summary-list/index",
"style": {
"navigationBarTitleText": "",
"navigationStyle": "custom"
}
},
{ {
"path": "pages/complete_add/index", "path": "pages/complete_add/index",
"style": { "style": {

View File

@ -1,7 +1,8 @@
<template> <template>
<view class="pb-[24rpx]"> <view class="pb-[24rpx]">
<date-strip v-model="value" @change="handleDateChange" height="160rpx" /> <w-date-more :curDate="curDate" type="recruitsale" />
<w-summary-form v-model="templateItems" @handle-confirm="handleConfirm" /> <date-strip v-model="curDate" @change="handleDateChange" height="160rpx" />
<w-summary-form v-model="templateItems" @handle-confirm="handleConfirm" :readonly="type" />
</view> </view>
</template> </template>
@ -31,11 +32,14 @@ const templateItems = ref([
{ formType: 2, formTitle: '有遇到什么问题', value: '' } { formType: 2, formTitle: '有遇到什么问题', value: '' }
]) ])
const handleConfirm = () => { const handleConfirm = () => {
if (date <= curDate.value) return
console.log(templateItems.value) console.log(templateItems.value)
} }
const value = ref(new Date().getTime()) const curDate = ref(new Date().getTime())
const type = ref('')
const handleDateChange = item => { const handleDateChange = item => {
console.log(item) type.value = item.type
} }
</script> </script>
<style scoped lang="scss"></style> <style scoped lang="scss"></style>

View File

@ -1,5 +1,6 @@
<template> <template>
<view class="pb-[24rpx]"> <view class="pb-[24rpx]">
<w-date-more :curDate="curDate" type="telesale" />
<date-strip v-model="value" @change="handleDateChange" height="160rpx" /> <date-strip v-model="value" @change="handleDateChange" height="160rpx" />
<w-summary-form v-model="templateItems" @handle-confirm="handleConfirm" /> <w-summary-form v-model="templateItems" @handle-confirm="handleConfirm" />
</view> </view>
@ -9,6 +10,7 @@
import { ref } from 'vue' import { ref } from 'vue'
import dateStrip from '@/components/date-strip/index.vue' import dateStrip from '@/components/date-strip/index.vue'
const curDate = ref(new Date().getTime())
const templateItems = ref([ const templateItems = ref([
{ formType: 1, formTitle: '今日打电话数量(包括不接、挂、空)', value: '' }, { formType: 1, formTitle: '今日打电话数量(包括不接、挂、空)', value: '' },
{ formType: 1, formTitle: '今日打出多少条有效数据(可以加微信)', value: '' }, { formType: 1, formTitle: '今日打出多少条有效数据(可以加微信)', value: '' },

View File

@ -1,8 +1,8 @@
@font-face { @font-face {
font-family: 'iconfont'; /* Project id 4837700 */ font-family: 'iconfont'; /* Project id 4837700 */
src: url('//at.alicdn.com/t/c/font_4837700_qvo1iou9n4.woff2?t=1740471403087') format('woff2'), src: url('//at.alicdn.com/t/c/font_4837700_wjnzp8mer6o.woff2?t=1740542409608') format('woff2'),
url('//at.alicdn.com/t/c/font_4837700_qvo1iou9n4.woff?t=1740471403087') format('woff'), url('//at.alicdn.com/t/c/font_4837700_wjnzp8mer6o.woff?t=1740542409608') format('woff'),
url('//at.alicdn.com/t/c/font_4837700_qvo1iou9n4.ttf?t=1740471403087') format('truetype'); url('//at.alicdn.com/t/c/font_4837700_wjnzp8mer6o.ttf?t=1740542409608') format('truetype');
} }
.iconfont { .iconfont {
@ -13,6 +13,14 @@
-moz-osx-font-smoothing: grayscale; -moz-osx-font-smoothing: grayscale;
} }
.icon-left:before {
content: '\e83d';
}
.icon-more:before {
content: '\e600';
}
.icon-edit:before { .icon-edit:before {
content: '\e636'; content: '\e636';
} }