From 2714b04f07d4e64c2d8baa49f6ffa3f2b983d65f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E9=82=A3=E4=BA=9B=E8=8A=B1=E5=84=BF?= <1156921458@qq.com>
Date: Thu, 11 Sep 2025 15:05:02 +0800
Subject: [PATCH] ..
---
.../zhgh/welfare/select/optionSelect.js | 46 ++++++++++++++++---
1 file changed, 39 insertions(+), 7 deletions(-)
diff --git a/src/main/resources/views/platform/zhgh/welfare/select/optionSelect.js b/src/main/resources/views/platform/zhgh/welfare/select/optionSelect.js
index 4de1c05..fb7c435 100644
--- a/src/main/resources/views/platform/zhgh/welfare/select/optionSelect.js
+++ b/src/main/resources/views/platform/zhgh/welfare/select/optionSelect.js
@@ -138,16 +138,24 @@ const optionSelect = {
联系信息
-
-
+
+
- 联系电话
+
+
+
+
+
+
@@ -222,7 +230,8 @@ const optionSelect = {
showOptionDetailDialog: false, // 选项详情弹窗
selectedOption: null, // 当前选中的选项
contactForm: {
- mobile: "" // 联系电话
+ mobile: "", // 联系电话,
+ receiveAddress: ""
},
contactRules: {
mobile: [
@@ -316,7 +325,8 @@ const optionSelect = {
this.selectedRadioId = null
this.contactForm = {
- mobile: ""
+ mobile: "",
+ receiveAddress: ""
}
this.getProjectInfo()
@@ -329,6 +339,11 @@ const optionSelect = {
this.projectInfo = res.data
this.deadlineTime = this.projectInfo.choiceTimeEnd
+ // 获取收货地址
+ if (this.projectInfo.provideMode === 3) {
+ this.getAddress()
+ }
+
// 初始化选项的selectNum为0
if (this.projectInfo.options) {
this.projectInfo.options.forEach((option) => {
@@ -365,6 +380,13 @@ const optionSelect = {
this.contactForm.mobile = this.userSelection[0]?.mobile
}
+ // 地址回显
+ if (this.projectInfo.provideMode === 3) {
+ if (this.userSelection && this.userSelection[0].receiveAddress) {
+ this.contactForm.receiveAddress = this.userSelection[0].receiveAddress
+ }
+ }
+
// 设置已选择的选项
if (this.projectInfo.options && this.userSelection.length > 0) {
// 单选模式
@@ -411,7 +433,8 @@ const optionSelect = {
{
selectOptionId: this.selectedRadioId,
selectNum: 1,
- mobile: this.contactForm.mobile
+ mobile: this.contactForm.mobile,
+ receiveAddress: this.contactForm.receiveAddress
}
]
}
@@ -421,7 +444,8 @@ const optionSelect = {
selections = this.selectedOptions.map((option) => ({
selectOptionId: option.id,
selectNum: option.selectNum,
- mobile: this.contactForm.mobile
+ mobile: this.contactForm.mobile,
+ receiveAddress: this.contactForm.receiveAddress
}))
}
@@ -501,6 +525,14 @@ const optionSelect = {
event.stopPropagation()
this.selectedOption = option
this.showOptionDetailDialog = true
+ },
+
+ // 获取收货地址
+ async getAddress() {
+ const resp = await this.$axios.post("/platform/welfare/addressManage/selectUserAddress")
+ if (resp.code === 0) {
+ this.addressOptions = resp.data
+ }
}
},
watch: {