From f856bcbc3862f63f10a7963619d9f0b27b75c888 Mon Sep 17 00:00:00 2001 From: ChoChoX Date: Tue, 23 Jun 2026 10:52:08 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9A=82=E5=AD=98=E6=9B=B4=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/customer.vue | 16 ++++++++++++---- src/components/panel.vue | 4 +++- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/src/components/customer.vue b/src/components/customer.vue index be6126c..5681bb3 100644 --- a/src/components/customer.vue +++ b/src/components/customer.vue @@ -3,7 +3,7 @@ import { Search } from '@element-plus/icons-vue' import { ref, onMounted, reactive } from 'vue' import { regionData, CodeToText, TextToCode } from 'element-china-area-data' -import { ElMessage } from 'element-plus' +import { ElMessage, ElMessageBox } from 'element-plus' import { getCustomerList, createCustomer, @@ -18,7 +18,8 @@ const form = reactive({ region: [], // 地区,默认为空数组(省市区三级代码) address: '', // 详细地址,默认为空字符串 email: '', // 电子邮箱,默认为空字符串 - customer_type: 'Normal' // 客户类型,默认选中"普通客户" + customer_type: 'Normal', // 客户类型,默认选中"普通客户" + remark: '' // 备注 }) const search = ref('') @@ -61,6 +62,7 @@ const resetForm = () => { form.address = '' form.email = '' form.customer_type = 'Normal' + form.remark = '' isEditMode.value = false currentCustomerId.value = null } @@ -87,6 +89,7 @@ const editCustomer = (row) => { form.address = row.address form.email = row.email form.customer_type = row.customer_type + form.remark = row.remark showAddForm.value = true showSearchResults.value = false } @@ -100,7 +103,8 @@ const saveCustomer = async () => { district: CodeToText[form.region[2]] || '', address: form.address, email: form.email, - customer_type: form.customer_type + customer_type: form.customer_type, + remark: form.remark } if (isEditMode.value) { await updateCustomer(currentCustomerId.value, formData) @@ -192,7 +196,7 @@ const clearSearch = () => { - +