From 7619d415522ab3dc3299d6a2a9f5c9964a692d3f Mon Sep 17 00:00:00 2001
From: 张诺 <zhang_12370@163.com>
Date: 星期三, 18 六月 2025 17:58:53 +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