From f4a4737d69746268f3648effcf66e1c1c83e64e1 Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期三, 29 四月 2026 14:03:23 +0800
Subject: [PATCH] 公司7004 1.标书台账页面开发与联调 2.客户管理添加客户类型字段
---
src/views/basicData/customerFile/index.vue | 74 ++++++++++++++++++++++++++----------
1 files changed, 53 insertions(+), 21 deletions(-)
diff --git a/src/views/basicData/customerFile/index.vue b/src/views/basicData/customerFile/index.vue
index 385b895..e358b53 100644
--- a/src/views/basicData/customerFile/index.vue
+++ b/src/views/basicData/customerFile/index.vue
@@ -92,25 +92,6 @@
</el-form-item>
</el-col>
</el-row>
- <el-row :gutter="30" v-for="(contact, index) in formYYs.contactList" :key="index">
- <el-col :span="12">
- <el-form-item label="鑱旂郴浜猴細" prop="contactPerson">
- <el-input v-model="contact.contactPerson" placeholder="璇疯緭鍏�" clearable />
- </el-form-item>
- </el-col>
- <el-col :span="12">
- <el-form-item label="鑱旂郴鐢佃瘽锛�" prop="contactPhone">
- <div style="display: flex; align-items: center;width: 100%;">
- <el-input v-model="contact.contactPhone" placeholder="璇疯緭鍏�" clearable />
- <el-button @click="removeContact(index)" type="danger" circle style="margin-left: 5px;">
- <el-icon><Close /></el-icon>
- </el-button>
- </div>
- </el-form-item>
- </el-col>
- </el-row>
- <el-button @click="addNewContact" style="margin-bottom: 10px;">+ 鏂板鑱旂郴浜�</el-button>
-
<el-row :gutter="30">
<el-col :span="12">
<el-form-item label="閾惰鍩烘湰鎴凤細" prop="basicBankAccount">
@@ -141,7 +122,38 @@
/>
</el-form-item>
</el-col>
+ <el-col :span="12">
+ <el-form-item label="瀹㈡埛绫诲瀷锛�" prop="customerType">
+ <el-select
+ v-model="form.customerType"
+ placeholder="璇烽�夋嫨"
+ clearable
+ style="width: 100%"
+ >
+ <el-option label="鏅�氬鎴�" :value="1" />
+ <el-option label="涓皬瀹㈡埛" :value="2" />
+ </el-select>
+ </el-form-item>
+ </el-col>
</el-row>
+ <el-row :gutter="30" v-for="(contact, index) in formYYs.contactList" :key="index">
+ <el-col :span="12">
+ <el-form-item label="鑱旂郴浜猴細" prop="contactPerson">
+ <el-input v-model="contact.contactPerson" placeholder="璇疯緭鍏�" clearable />
+ </el-form-item>
+ </el-col>
+ <el-col :span="12">
+ <el-form-item label="鑱旂郴鐢佃瘽锛�" prop="contactPhone">
+ <div style="display: flex; align-items: center;width: 100%;">
+ <el-input v-model="contact.contactPhone" placeholder="璇疯緭鍏�" clearable />
+ <el-button @click="removeContact(index)" type="danger" circle style="margin-left: 5px;">
+ <el-icon><Close /></el-icon>
+ </el-button>
+ </div>
+ </el-form-item>
+ </el-col>
+ </el-row>
+ <el-button @click="addNewContact" style="margin-bottom: 10px;">+ 鏂板鑱旂郴浜�</el-button>
<el-row :gutter="30">
<el-col :span="12">
<el-form-item label="缁存姢浜猴細" prop="maintainer">
@@ -231,7 +243,7 @@
</template>
<script setup>
-import { ref } from "vue";
+import {onMounted, ref} from "vue";
import { Search } from "@element-plus/icons-vue";
import {
addCustomer,
@@ -248,6 +260,22 @@
const userStore = useUserStore();
const tableColumn = ref([
+ {
+ label: "瀹㈡埛绫诲瀷",
+ prop: "customerType",
+ width: 120,
+ dataType: "tag",
+ formatData: (value) => {
+ if (String(value) === "1") return "鏅�氬鎴�";
+ if (String(value) === "2") return "涓皬瀹㈡埛";
+ return "";
+ },
+ formatType: (value) => {
+ if (String(value) === "1") return "primary";
+ if (String(value) === "2") return "success";
+ return "info";
+ },
+ },
{
label: "瀹㈡埛鍚嶇О",
prop: "customerName",
@@ -343,6 +371,7 @@
},
form: {
customerName: "",
+ customerType: undefined,
taxpayerIdentificationNumber: "",
companyAddress: "",
companyPhone: "",
@@ -356,6 +385,7 @@
},
rules: {
customerName: [{ required: true, message: "璇疯緭鍏�", trigger: "blur" }],
+ customerType: [{ required: true, message: "璇烽�夋嫨", trigger: "change" }],
taxpayerIdentificationNumber: [
{ required: true, message: "璇疯緭鍏�", trigger: "blur" },
],
@@ -591,7 +621,9 @@
return `${year}-${month}-${day}`;
}
-getList();
+onMounted(() => {
+ getList();
+});
</script>
<style scoped lang="scss"></style>
--
Gitblit v1.9.3