From e00905e53ee5d91d9e488ecf5ece3e25b9889436 Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期二, 20 一月 2026 16:14:44 +0800
Subject: [PATCH] 湟水峡 1.采购模块不要项目名称 2.加一个有待回款登记的提示 3.回款登记、付款登记改成和销售订单价格关联,并且可以多个一起回款或付款 4.合同管理不要下载合同了,跟合同相关的字段可以去掉了 5.重构生产模块 6.测试流程并修改bug
---
src/views/basicData/customerFile/index.vue | 190 ++++++++---------------------------------------
1 files changed, 34 insertions(+), 156 deletions(-)
diff --git a/src/views/basicData/customerFile/index.vue b/src/views/basicData/customerFile/index.vue
index 94168c4..6274ace 100644
--- a/src/views/basicData/customerFile/index.vue
+++ b/src/views/basicData/customerFile/index.vue
@@ -60,20 +60,6 @@
</el-form-item>
</el-col>
<el-col :span="12">
- <el-form-item
- label="绾崇◣浜鸿瘑鍒彿锛�"
- prop="taxpayerIdentificationNumber"
- >
- <el-input
- v-model="form.taxpayerIdentificationNumber"
- placeholder="璇疯緭鍏�"
- clearable
- />
- </el-form-item>
- </el-col>
- </el-row>
- <el-row :gutter="30">
- <el-col :span="12">
<el-form-item label="鍏徃鍦板潃锛�" prop="companyAddress">
<el-input
v-model="form.companyAddress"
@@ -82,69 +68,31 @@
/>
</el-form-item>
</el-col>
- <el-col :span="12">
- <el-form-item label="鍏徃鐢佃瘽锛�" prop="companyPhone">
- <el-input
- v-model="form.companyPhone"
- placeholder="璇疯緭鍏�"
- clearable
- />
- </el-form-item>
- </el-col>
</el-row>
<el-row :gutter="30">
<el-col :span="12">
- <el-form-item label="閾惰鍩烘湰鎴凤細" prop="basicBankAccount">
- <el-input
- v-model="form.basicBankAccount"
- placeholder="璇疯緭鍏�"
+ <el-form-item label="瀹㈡埛绫诲瀷锛�" prop="customerType">
+ <el-select
+ v-model="form.customerType"
+ placeholder="璇烽�夋嫨"
clearable
- />
- </el-form-item>
- </el-col>
- <el-col :span="12">
- <el-form-item label="閾惰璐﹀彿锛�" prop="bankAccount">
- <el-input
- v-model="form.bankAccount"
- placeholder="璇疯緭鍏�"
- clearable
- />
+ style="width: 100%"
+ >
+ <el-option
+ v-for="item in customerTypeOptions"
+ :key="item.value"
+ :label="item.label"
+ :value="item.value"
+ />
+ </el-select>
</el-form-item>
</el-col>
</el-row>
- <el-row :gutter="30">
- <el-col :span="12">
- <el-form-item label="寮�鎴疯鍙凤細" prop="bankCode">
- <el-input
- v-model="form.bankCode"
- placeholder="璇疯緭鍏�"
- clearable
- />
- </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">
<el-select
+ filterable
v-model="form.maintainer"
placeholder="璇烽�夋嫨"
clearable
@@ -249,41 +197,23 @@
{
label: "瀹㈡埛鍚嶇О",
prop: "customerName",
- width: 220,
},
{
- label: "绾崇◣浜鸿瘑鍒爜",
- prop: "taxpayerIdentificationNumber",
- width: 220,
+ label: "瀹㈡埛绫诲瀷",
+ prop: "customerType",
+ dataType: "tag",
+ formatData: (val) => val || "--",
+ formatType: (val) => {
+ const map = {
+ '涓�鎵瑰晢': "primary",
+ '缁堢鍟�': "success",
+ };
+ return map[val] || "info";
+ },
},
{
label: "鍦板潃鍙婅仈绯绘柟寮�",
prop: "addressPhone",
- width: 250,
- },
- {
- label: "鑱旂郴浜�",
- prop: "contactPerson",
- },
- {
- label: "鑱旂郴鐢佃瘽",
- prop: "contactPhone",
- width:150
- },
- {
- label: "閾惰鍩烘湰鎴�",
- prop: "basicBankAccount",
- width: 220,
- },
- {
- label: "閾惰璐﹀彿",
- prop: "bankAccount",
- width: 220,
- },
- {
- label: "寮�鎴疯鍙�",
- prop: "bankCode",
- width:220
},
{
label: "缁存姢浜�",
@@ -292,7 +222,7 @@
{
label: "缁存姢鏃堕棿",
prop: "maintenanceTime",
- width: 100,
+ width: 200,
},
{
dataType: "action",
@@ -305,10 +235,7 @@
type: "text",
clickFun: (row) => {
openForm("edit", row);
- },
- disabled: (row) => {
- return row.maintainer !== userStore.nickName
- }
+ }
},
],
},
@@ -317,6 +244,11 @@
const selectedRows = ref([]);
const userList = ref([]);
const tableLoading = ref(false);
+// 瀹㈡埛绫诲瀷閫夐」
+const customerTypeOptions = ref([
+ { label: "涓�鎵瑰晢", value: "涓�鎵瑰晢" },
+ { label: "缁堢鍟�", value: "缁堢鍟�" },
+]);
const page = reactive({
current: 1,
size: 100,
@@ -327,47 +259,25 @@
// 鐢ㄦ埛淇℃伅琛ㄥ崟寮规鏁版嵁
const operationType = ref("");
const dialogFormVisible = ref(false);
-const formYYs = ref({ // 鍏朵粬瀛楁...
- contactList: [
- {
- contactPerson: "",
- contactPhone: ""
- }
- ]
-});
const data = reactive({
searchForm: {
customerName: "",
},
form: {
customerName: "",
- taxpayerIdentificationNumber: "",
+ customerType: "",
companyAddress: "",
- companyPhone: "",
- contactPerson: "",
- contactPhone: "",
maintainer: "",
maintenanceTime: "",
- basicBankAccount: "",
- bankAccount: "",
- bankCode: "",
},
rules: {
customerName: [{ required: true, message: "璇疯緭鍏�", trigger: "blur" }],
- taxpayerIdentificationNumber: [
- { required: true, message: "璇疯緭鍏�", trigger: "blur" },
- ],
+ customerType: [{ required: false, message: "璇疯緭鍏�", trigger: "blur" }],
companyAddress: [{ required: true, message: "璇疯緭鍏�", trigger: "blur" }],
- companyPhone: [{ required: true, message: "璇疯緭鍏�", trigger: "blur" }],
- // contactPerson: [{ required: true, message: "璇疯緭鍏�", trigger: "blur" }],
- // contactPhone: [{ required: true, message: "璇疯緭鍏�", trigger: "blur" }],
maintainer: [{ required: false, message: "璇烽�夋嫨", trigger: "change" }],
maintenanceTime: [
{ required: false, message: "璇烽�夋嫨", trigger: "change" },
],
- basicBankAccount: [{ required: true, message: "璇疯緭鍏�", trigger: "blur" }],
- bankAccount: [{ required: true, message: "璇疯緭鍏�", trigger: "blur" }],
- bankCode: [{ required: true, message: "璇疯緭鍏�", trigger: "blur" }],
},
});
const upload = reactive({
@@ -422,18 +332,6 @@
}
});
const { searchForm, form, rules } = toRefs(data);
-const addNewContact = () => {
- formYYs.value.contactList.push({
- contactPerson: "",
- contactPhone: ""
- });
-};
-
-const removeContact = (index) => {
- if (formYYs.value.contactList.length > 1) {
- formYYs.value.contactList.splice(index, 1);
- }
-};
// 鏌ヨ鍒楄〃
/** 鎼滅储鎸夐挳鎿嶄綔 */
const handleQuery = () => {
@@ -476,12 +374,6 @@
operationType.value = type;
form.value = {};
form.value.maintainer = userStore.nickName;
- formYYs.value.contactList = [
- {
- contactPerson: "",
- contactPhone: ""
- }
- ];
form.value.maintenanceTime = getCurrentDate();
userListNoPage().then((res) => {
userList.value = res.data;
@@ -489,13 +381,6 @@
if (type === "edit") {
getCustomer(row.id).then((res) => {
form.value = { ...res.data };
- formYYs.value.contactList = res.data.contactPerson.split(",").map((item, index) => {
- return {
- contactPerson: item,
- contactPhone: res.data.contactPhone.split(",")[index]
- }
- });
-
});
}
dialogFormVisible.value = true;
@@ -514,11 +399,6 @@
};
// 鎻愪氦鏂板
const submitAdd = () => {
- if(formYYs.value.contactList.length < 1){
- return proxy.$modal.msgWarning("璇疯嚦灏戞坊鍔犱竴涓仈绯讳汉");
- }
- form.value.contactPerson = formYYs.value.contactList.map(item => item.contactPerson).join(",");
- form.value.contactPhone = formYYs.value.contactList.map(item => item.contactPhone).join(",");
addCustomer(form.value).then((res) => {
proxy.$modal.msgSuccess("鎻愪氦鎴愬姛");
closeDia();
@@ -527,8 +407,6 @@
};
// 鎻愪氦淇敼
const submitEdit = () => {
- form.value.contactPerson = formYYs.value.contactList.map(item => item.contactPerson).join(",");
- form.value.contactPhone = formYYs.value.contactList.map(item => item.contactPhone).join(",");
updateCustomer(form.value).then((res) => {
proxy.$modal.msgSuccess("鎻愪氦鎴愬姛");
closeDia();
--
Gitblit v1.9.3