OfficeSystem/components/customer-form/CustomerOtherInfo.vue

166 lines
3.4 KiB
Vue
Raw Normal View History

2025-11-08 10:39:16 +08:00
<template>
<view class="form-section">
<view class="section-title">其他信息</view>
<!-- 备注 -->
<view class="form-item">
<textarea
:value="formData.remark"
@input="updateField('remark', $event.detail.value)"
class="form-textarea"
placeholder="输入备注"
placeholder-style="color: #999;"
auto-height
/>
</view>
<!-- 顾虑点 -->
<view class="form-item">
<textarea
:value="formData.concern"
@input="updateField('concern', $event.detail.value)"
class="form-textarea"
placeholder="输入顾虑点"
placeholder-style="color: #999;"
auto-height
/>
</view>
<!-- 痛点 -->
<view class="form-item">
<textarea
:value="formData.pain"
@input="updateField('pain', $event.detail.value)"
class="form-textarea"
placeholder="输入痛点"
placeholder-style="color: #999;"
auto-height
/>
</view>
<!-- 关注点 -->
<view class="form-item">
<textarea
:value="formData.attention"
@input="updateField('attention', $event.detail.value)"
class="form-textarea"
placeholder="输入关注点"
placeholder-style="color: #999;"
auto-height
/>
</view>
<!-- 需求点 -->
<view class="form-item">
<textarea
:value="formData.demand"
@input="updateField('demand', $event.detail.value)"
class="form-textarea"
placeholder="输入需求点"
placeholder-style="color: #999;"
auto-height
/>
</view>
<!-- 下次跟进时间 -->
<view class="form-item clickable-item" @click="$emit('open-picker', 'nextFollowTime')">
<text v-if="formData.nextFollowTime" class="form-value">{{ formData.nextFollowTime }}</text>
<text v-else class="form-placeholder">选择下次跟进时间可选</text>
<text class="arrow"></text>
</view>
</view>
</template>
<script setup>
const props = defineProps({
formData: {
type: Object,
required: true
}
});
const emit = defineEmits(['update:formData', 'open-picker']);
const updateField = (field, value) => {
emit('update:formData', {
...props.formData,
[field]: value
});
};
</script>
<style lang="scss" scoped>
.form-section {
background-color: #fff;
border-radius: 8px;
padding: 16px;
margin-bottom: 16px;
}
.section-title {
font-size: 16px;
font-weight: 600;
color: #333;
margin-bottom: 16px;
padding-bottom: 12px;
border-bottom: 1px solid #eee;
}
.form-item {
margin-bottom: 16px;
&:last-child {
margin-bottom: 0;
}
}
.form-label {
font-size: 14px;
color: #666;
margin-bottom: 8px;
display: block;
}
.form-textarea {
width: 100%;
min-height: 80px;
padding: 12px;
font-size: 15px;
color: #333;
background-color: #f8f8f8;
border-radius: 6px;
border: 1px solid #e0e0e0;
}
.clickable-item {
display: flex;
align-items: center;
justify-content: space-between;
height: 44px;
padding: 0 12px;
background-color: #f8f8f8;
border-radius: 6px;
border: 1px solid #e0e0e0;
cursor: pointer;
pointer-events: auto;
user-select: none;
-webkit-tap-highlight-color: transparent;
}
.form-value {
font-size: 15px;
color: #333;
}
.form-placeholder {
font-size: 15px;
color: #999;
}
.arrow {
font-size: 20px;
color: #999;
}
</style>