From 77e29e8e84a8a44c924b304fcb06f81dec594b07 Mon Sep 17 00:00:00 2001 From: gaoluyang <2820782392@qq.com> Date: 星期五, 06 六月 2025 14:57:06 +0800 Subject: [PATCH] 1.库存管理页面表头修改 2.销售出库表单字段添加 --- src/views/basicInformation/mould/customer.vue | 23 +++++++++++++++++------ 1 files changed, 17 insertions(+), 6 deletions(-) diff --git a/src/views/basicInformation/mould/customer.vue b/src/views/basicInformation/mould/customer.vue index 4053cd7..f0f25c1 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() }) @@ -159,7 +163,6 @@ let result = await addOrEditCustomer({ ...formData.value, }) - console.log(result); obj.value = { title: "缂栬緫", ...formData.value, @@ -178,7 +181,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 +218,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