From 170d2e8357a759686a46a598669ddb4119fbdf38 Mon Sep 17 00:00:00 2001
From: 张诺 <zhang_12370@163.com>
Date: 星期五, 20 六月 2025 15:05:25 +0800
Subject: [PATCH] 修复采购管理下拉无数据 修改基础管理-供应商模块字段匹配问题
---
src/views/basicInformation/mould/customer.vue | 25 +++++++++++++++++--------
1 files changed, 17 insertions(+), 8 deletions(-)
diff --git a/src/views/basicInformation/mould/customer.vue b/src/views/basicInformation/mould/customer.vue
index 4053cd7..0aa5a62 100644
--- a/src/views/basicInformation/mould/customer.vue
+++ b/src/views/basicInformation/mould/customer.vue
@@ -38,12 +38,12 @@
<el-form-item label="鑱旂郴浜鸿缁�" prop="contactAddress">
<el-input v-model="formData.contactAddress" placeholder="璇疯緭鍏ヨ仈绯讳汉璇︾粏鍦板潃" />
</el-form-item>
- <el-form-item>
+ <el-form-item class="dialog-footer">
+ <el-button v-if="addOrEdit === 'edit'" @click="resetForm">閲嶇疆</el-button>
+ <el-button v-if="addOrEdit === 'add'" @click="cancelForm">鍙栨秷</el-button>
<el-button type="primary" @click="submitForm">
纭畾
</el-button>
- <el-button v-if="addOrEdit === 'edit'" @click="resetForm">閲嶇疆</el-button>
- <el-button v-if="addOrEdit === 'add'" @click="cancelForm">鍙栨秷</el-button>
</el-form-item>
</el-form>
</el-dialog>
@@ -83,6 +83,10 @@
"handleBeforeClose",
"update:customerDialogFormVisible",
]);
+const copyForm = defineModel("copyForm", {
+ required: true,
+ type: Object,
+});
onMounted(() => {
fetchAreaOptions()
})
@@ -154,12 +158,9 @@
result
};
} else {
- delete formData.value.createTime
- delete formData.value.updateTime
let result = await addOrEditCustomer({
...formData.value,
})
- console.log(result);
obj.value = {
title: "缂栬緫",
...formData.value,
@@ -178,7 +179,9 @@
// 閲嶇疆琛ㄥ崟
const resetForm = () => {
if (!formRef.value) return;
- formRef.value.resetFields();
+ formData.value = JSON.parse(JSON.stringify(copyForm.value));
+
+ // formRef.value.resetFields();
};
// 鍏抽棴寮圭獥
const handleClose = () => {
@@ -213,5 +216,11 @@
});
</script>
-<style lang="sass" scoped>
+<style lang="scss" scoped>
+.dialog-footer {
+ display: flex;
+ justify-content: flex-end;
+ margin-top: 20px;
+ flex-direction: column;
+}
</style>
\ No newline at end of file
--
Gitblit v1.9.3