【招生老师】 修复# 转化完成:提交是否转化成功字段时值为null

master
kaeery 2025-02-27 22:31:40 +08:00
parent 504d381eff
commit 4bb1478021
10 changed files with 29 additions and 39 deletions

View File

@ -32,6 +32,7 @@ export function apiEditRemark(params: any) {
export function apiEditClue(params: any) {
return request.post({ url: '/clue/edit', data: params })
}
// 电销线索列表
export function apiTeleClueList(params: any) {
return request.get({ url: '/clue/telemarketingList', data: params })
}

View File

@ -1,7 +1,7 @@
<template>
<view class="bg-[#FAFAFE]">
<view class="bg-white px-[32rpx]">
<TForm ref="tForm" :model="form" :rules="rules" errorType="toast">
<TForm ref="tForm" :model="form" errorType="toast">
<TFormItem prop="recruitTeacherName">
<TInputField
v-model="form.recruitTeacherName"
@ -114,9 +114,6 @@ const form = ref({
isConversion: 0,
remark: ''
})
const rules = {
isConversion: [{ required: true, message: '请选择是否转化成功' }]
}
const parseStatusText = computed(
() => optionsMap.stateOptions.find(item => item.value == form.value.state)?.label
)
@ -153,7 +150,11 @@ const handleSubmit = () => {
}
const setFormData = () => {
for (const key in clueDetailInfo.value) {
if (Object.prototype.hasOwnProperty.call(form.value, key)) {
if (
Object.prototype.hasOwnProperty.call(form.value, key) &&
clueDetailInfo.value[key] != null &&
clueDetailInfo.value[key] != undefined
) {
form.value[key] = clueDetailInfo.value[key]
}
}

View File

@ -74,7 +74,7 @@ const handleConfirm = () => {
await apiEditClue(form.value)
toast('修改成功')
uni.navigateBack()
uni.$emit('refreshPage')
uni.$emit('refreshPageList')
} catch (error) {}
loading.value = false
}

View File

@ -59,17 +59,6 @@ const labelStyle = computed(() => {
const handleSwitchChange = (value: number) => {
emit('update:modelValue', value)
}
watch(
() => props.modelValue,
val => {
innerValue.value = val
},
{
deep: true,
immediate: true
}
)
</script>
<style lang="scss" scoped>

View File

@ -6,7 +6,7 @@
<text>{{ item.studentName }}</text>
<view class="flex ml-[48rpx] gap-[4rpx] items-center">
<text class="text-primary">{{ item.phone }}</text>
<u-copy content="uview-plus is great !">
<u-copy :content="item.phone">
<TIcon name="icon-copy" color="#0E66FB" />
</u-copy>
</view>
@ -24,11 +24,11 @@
</view>
<view class="flex gap-[20rpx]">
<text class="text-muted w-[128rpx]">基本情况</text>
<view class="flex gap-[4rpx] flex-1 items-end">
<view class="flex gap-[4rpx] flex-1 items-center">
<text>
{{ item.basicInformation }}
</text>
<u-copy content="uview-plus is great !">
<u-copy :content="item.basicInformation !">
<TIcon name="icon-copy" color="#0E66FB" />
</u-copy>
</view>

View File

@ -6,7 +6,7 @@
<text>{{ item.studentName }}</text>
<view class="flex ml-[48rpx] gap-[4rpx] items-center">
<text class="text-primary">{{ item.phone }}</text>
<u-copy content="uview-plus is great !">
<u-copy :content="item.phone">
<TIcon name="icon-copy" color="#0E66FB" />
</u-copy>
</view>
@ -52,6 +52,7 @@
<script setup lang="ts">
import { computed, PropType } from 'vue'
import { converStatusEnum, stateEnum } from '@/enums'
import { onLoad } from '@dcloudio/uni-app'
export interface IClue {
studentName: string

View File

@ -25,8 +25,7 @@
</template>
<script setup lang="ts">
import { onLoad } from '@dcloudio/uni-app'
import { ref } from 'vue'
import { ref, onMounted } from 'vue'
import { debounce } from 'lodash-es'
import clueCard from './clue-card.vue'
import { useZPaging } from '@/hooks/useZPaging'
@ -42,11 +41,11 @@ const { paging, queryList, refresh, changeApi, setParams } = useZPaging(
() => {}
)
const searchChange = debounce(() => {
refresh()
refresh(queryParams.value)
}, 300)
onLoad(() => {
uni.$on('refreshPage', () => {
onMounted(() => {
uni.$on('refreshPageList', () => {
refresh(queryParams.value)
})
})

View File

@ -43,14 +43,11 @@
<script setup lang="ts">
import { useZPaging } from '@/hooks/useZPaging'
import { ref } from 'vue'
import { ref, onMounted, shallowRef, computed } from 'vue'
import { debounce } from 'lodash-es'
import clueCard from '@/components/widgets/recruitsale/clue-card.vue'
import { shallowRef } from 'vue'
import { computed } from 'vue'
import { apiCluseList, apiEditRemark } from '@/api/clue'
import { converStatusEnum } from '@/enums'
import { onLoad } from '@dcloudio/uni-app'
import { debounce } from 'lodash-es'
import { toast } from '@/utils/util'
const tabs = shallowRef([
@ -97,13 +94,13 @@ const handleConfirm = async () => {
refresh(queryParams.value)
} catch (error) {}
}
onLoad(() => {
onMounted(() => {
uni.$on('refreshPage', () => {
refresh(queryParams.value)
})
})
const searchChange = debounce(() => {
refresh()
refresh(queryParams.value)
}, 300)
</script>
<style scoped></style>

View File

@ -1,10 +1,11 @@
<template>
<TContainer>
<view class="pb-[24rpx]">
<w-date-more :curDate="curDate" type="telesale" />
<date-strip v-model="value" @change="handleDateChange" height="160rpx" />
<w-summary-form v-model="templateItems" @handle-confirm="handleConfirm" />
<tabbar />
</view>
</TContainer>
</template>
<script setup lang="ts">

View File

@ -70,6 +70,7 @@
immediate: true,
handler(n) {
if(n !== this.inactiveValue && n !== this.activeValue) {
console.log(n, this.inactiveValue, this.activeValue);
error('v-model绑定的值必须为inactiveValue、activeValue二者之一')
}
}