diff --git a/components/customer-form/CustomerBasicInfo.vue b/components/customer-form/CustomerBasicInfo.vue
index 62dd8a3..ab53123 100644
--- a/components/customer-form/CustomerBasicInfo.vue
+++ b/components/customer-form/CustomerBasicInfo.vue
@@ -3,10 +3,14 @@
客户信息
-
+
{{ getCustomerTypeText(formData.customerType) }}
选择客户类型
- ›
+ ›
@@ -95,6 +99,10 @@ const props = defineProps({
type: Object,
required: true
},
+ lockCustomerType: {
+ type: Boolean,
+ default: false
+ },
customerTypeOptions: {
type: Array,
default: () => []
@@ -185,6 +193,17 @@ const getCustomerStatusText = (value) => {
-webkit-tap-highlight-color: transparent;
}
+.locked-item {
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ height: 44px;
+ padding: 0 12px;
+ background-color: #f0f0f0;
+ border-radius: 6px;
+ border: 1px solid #e0e0e0;
+}
+
.form-value {
font-size: 15px;
color: #333;
diff --git a/pages/customer/add/index.vue b/pages/customer/add/index.vue
index 9264c5b..0f79f21 100644
--- a/pages/customer/add/index.vue
+++ b/pages/customer/add/index.vue
@@ -12,6 +12,7 @@
:customer-type-options="customerTypeOptions"
:intent-level-options="intentLevelOptions"
:customer-status-options="customerStatusOptions"
+ :lock-customer-type="true"
@update:form-data="formData = $event"
@open-picker="handleOpenPicker"
/>
@@ -87,7 +88,7 @@ const {
// 表单数据
const formData = ref({
- customerType: '',
+ customerType: '2',
name: '',
mobile: '',
wechat: '',
@@ -247,7 +248,7 @@ const handleSave = async () => {
intents: intentsArray,
followId: userId,
remark: formData.value.remark.trim() || null,
- type: formData.value.customerType || '2',
+ type: '2',
workWechatId: formData.value.workWechatId || null,
regionIds: regionIdsArray,
attention: formData.value.attention.trim() || null,
diff --git a/pages/customer/edit/index.vue b/pages/customer/edit/index.vue
index ca554a6..fe435c3 100644
--- a/pages/customer/edit/index.vue
+++ b/pages/customer/edit/index.vue
@@ -12,6 +12,7 @@
:customer-type-options="customerTypeOptions"
:intent-level-options="intentLevelOptions"
:customer-status-options="customerStatusOptions"
+ :lock-customer-type="true"
@update:form-data="formData = $event"
@open-picker="handleOpenPicker"
/>