Merge remote-tracking branch 'origin/main'
This commit is contained in:
@@ -38,6 +38,12 @@ const selectView = {
|
||||
<div class="info-item">
|
||||
<div class="info-label">联系电话</div>
|
||||
<div class="info-value">{{ mergedSelections[0]?.mobile || '暂无' }}</div>
|
||||
|
||||
</div>
|
||||
<div class="info-item">
|
||||
<div class="info-label">收货地址</div>
|
||||
<div class="info-value">{{ mergedSelections[0]?.receiveAddress || '暂无' }}</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
<!--#include("../addressManage/addressDialog.js"){}#-->
|
||||
const optionSelect = {
|
||||
template: /*language=HTML*/ `
|
||||
<div class="welfare-select-container" v-if="projectInfo.id">
|
||||
@@ -23,9 +24,9 @@ const optionSelect = {
|
||||
<i class="el-icon-info"></i>
|
||||
<span>项目信息</span>
|
||||
</div>
|
||||
<div class="project-cover" v-if="projectInfo.cover">
|
||||
<el-image :src="projectInfo.cover" fit="cover"></el-image>
|
||||
</div>
|
||||
<!-- <div class="project-cover" v-if="projectInfo.cover">
|
||||
<el-image :src="projectInfo.cover" fit="cover"></el-image>
|
||||
</div>-->
|
||||
<div class="welfare-info-content">
|
||||
<div class="info-item">
|
||||
<div class="info-label">项目名称</div>
|
||||
@@ -133,7 +134,7 @@ const optionSelect = {
|
||||
<el-dialog
|
||||
title="确认选择"
|
||||
:visible.sync="showConfirmDialog"
|
||||
width="500px"
|
||||
width="60%"
|
||||
append-to-body
|
||||
custom-class="welfare-confirm-dialog">
|
||||
<div class="confirm-content">
|
||||
@@ -141,25 +142,37 @@ const optionSelect = {
|
||||
<div class="confirm-mobile-section">
|
||||
<div class="confirm-section-title">联系信息</div>
|
||||
<el-form :model="contactForm" ref="contactForm" :rules="contactRules" label-width="80px">
|
||||
<el-form-item prop="mobile" label="联系电话">
|
||||
<el-input
|
||||
v-model="contactForm.mobile"
|
||||
placeholder="请输入手机号码"
|
||||
maxlength="11"
|
||||
clearable>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item v-if="projectInfo.provideMode == 3" prop="receiveAddress" label="收货地址"
|
||||
:rules="[{ required: true, message: '请选择收货地址', trigger: 'change' }]">
|
||||
<el-select v-model="contactForm.receiveAddress" placeholder="请选择收货地址"
|
||||
style="width: 100%">
|
||||
<el-option v-for="item in addressOptions"
|
||||
:key="item.id"
|
||||
:label="item.userName + ' ' + item.tel + ' ' + item.province + ' ' + item.city + ' ' + item.county + ' ' + item.addressDetail"
|
||||
:value="item.userName + ' ' + item.tel + ' ' + item.province + ' ' + item.city + ' ' + item.county + ' ' + item.addressDetail">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-row :gutter="10">
|
||||
<el-col :span="24">
|
||||
<el-form-item prop="mobile" label="联系电话">
|
||||
<el-input
|
||||
v-model="contactForm.mobile"
|
||||
placeholder="请输入手机号码"
|
||||
maxlength="11"
|
||||
clearable>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="20">
|
||||
<el-form-item v-if="projectInfo.provideMode == 3" prop="receiveAddress"
|
||||
label="收货地址"
|
||||
:rules="[{ required: true, message: '请选择收货地址', trigger: 'change' }]">
|
||||
<el-select v-model="contactForm.receiveAddress" placeholder="请选择收货地址"
|
||||
style="width: 100%">
|
||||
<el-option v-for="item in addressOptions"
|
||||
:key="item.id"
|
||||
:label="'收货人:'+item.userName + ',联系电话:' + item.tel + ',收货地址:' + item.province+ item.city+ item.county+ item.addressDetail"
|
||||
:value="'收货人:'+item.userName + ',联系电话:' + item.tel + ',收货地址:' + item.province+ item.city+ item.county+ item.addressDetail">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-button @click="openAddress" type="primary">添加地址</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
|
||||
</el-form>
|
||||
</div>
|
||||
|
||||
@@ -217,6 +230,8 @@ const optionSelect = {
|
||||
<el-button type="primary" :loading="isSubmitting" @click="doSubmit">{{ hasSubmittedBefore ? '确认修改' : '确认提交' }}</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
|
||||
<address-dialog ref="addressDialog" @select_user_address="getAddress"></address-dialog>
|
||||
</div>
|
||||
`,
|
||||
store,
|
||||
@@ -250,6 +265,9 @@ const optionSelect = {
|
||||
addressOptions: []
|
||||
}
|
||||
},
|
||||
components: {
|
||||
"address-dialog": ADDRESS_DIALOG
|
||||
},
|
||||
computed: {
|
||||
// 是否有选择
|
||||
hasSelection() {
|
||||
@@ -323,6 +341,10 @@ const optionSelect = {
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
openAddress() {
|
||||
this.$refs.addressDialog.dialogVisible = true
|
||||
this.$refs.addressDialog.formData = {userId: this.userId}
|
||||
},
|
||||
// 打开选择项目弹窗 userId为null默认则是本人
|
||||
onOpen(projectId, userId = null) {
|
||||
this.projectId = projectId
|
||||
|
||||
@@ -75,6 +75,10 @@ layout("/layouts/platform.html"){
|
||||
<el-button type="primary" size="small" icon="el-icon-download" style="margin-left: 10px" @click="exportXlsx">
|
||||
导出选择情况表
|
||||
</el-button>
|
||||
|
||||
<el-button type="primary" size="small" icon="el-icon-download" style="margin-left: 10px" @click="receiveXlsx">
|
||||
导出领取表
|
||||
</el-button>
|
||||
</table-tool>
|
||||
|
||||
<el-table
|
||||
@@ -195,6 +199,11 @@ layout("/layouts/platform.html"){
|
||||
this.$downLoad("/platform/welfare/selection/situation/exportXlsx", { pageForm: JSON.stringify(this.pageForm) })
|
||||
},
|
||||
|
||||
// 导出选择情况表
|
||||
receiveXlsx() {
|
||||
this.$downLoad("/platform/welfare/selection/situation/receiveXlsx", { pageForm: JSON.stringify(this.pageForm) })
|
||||
},
|
||||
|
||||
// 管理员待选
|
||||
proxySelect(row) {
|
||||
this.optionSelectVisible = true
|
||||
|
||||
@@ -85,11 +85,11 @@ layout("/layouts/platform_h5.html"){
|
||||
<div class="wf-card-heading">{{row.name}}</div>
|
||||
<div class="wf-time-row">
|
||||
<span class="wf-time-label">开始时间:</span>
|
||||
{{row.choiceTimeStart}}
|
||||
{{$moment(row.choiceTimeStart).format('YYYY-MM-DD HH:mm')}}
|
||||
</div>
|
||||
<div class="wf-time-row">
|
||||
<span class="wf-time-label">结束时间:</span>
|
||||
{{row.choiceTimeEnd}}
|
||||
{{$moment(row.choiceTimeEnd).format('YYYY-MM-DD HH:mm')}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
const selectView = {
|
||||
template: /*language=HTML*/ `
|
||||
<van-action-sheet
|
||||
v-model="visible"
|
||||
:title="'我的福利选择'"
|
||||
close-icon="close"
|
||||
safe-area-inset-bottom
|
||||
@close="handleClose"
|
||||
:overlay-class="detailVisible ? 'no-overlay' : ''"
|
||||
v-model="visible"
|
||||
:title="'我的福利选择'"
|
||||
close-icon="close"
|
||||
safe-area-inset-bottom
|
||||
@close="handleClose"
|
||||
:overlay-class="detailVisible ? 'no-overlay' : ''"
|
||||
>
|
||||
<div class="welfare-view">
|
||||
<!-- 内容区域 -->
|
||||
@@ -14,37 +14,58 @@ const selectView = {
|
||||
<van-pull-refresh v-model="refreshing" @refresh="onRefresh">
|
||||
<van-skeleton title :row="6" :loading="loading" animated>
|
||||
<!-- 项目基本信息 -->
|
||||
|
||||
<div class="welfare-card">
|
||||
<div class="welfare-card__header">
|
||||
<i class="el-icon-s-flag"></i>
|
||||
<span>项目基本信息</span>
|
||||
</div>
|
||||
<div class="welfare-card__content">
|
||||
<div class="info-row">
|
||||
<div class="info-row__label">项目名称</div>
|
||||
<div class="info-row__value">{{ projectInfo.name }}</div>
|
||||
</div>
|
||||
<div class="info-row info-row--time">
|
||||
<div class="info-row__label">选择时间</div>
|
||||
<div class="info-row__value">
|
||||
<div class="time-item time-item--start">{{ projectInfo.choiceTimeStart }}</div>
|
||||
<div class="time-item time-item--end">{{ projectInfo.choiceTimeEnd }}</div>
|
||||
<van-collapse v-model="activeNames">
|
||||
<van-collapse-item name="1">
|
||||
<template #title>
|
||||
<div class="welfare-card__header">
|
||||
<i class="el-icon-s-flag"></i>
|
||||
<span>项目基本信息</span>
|
||||
</div>
|
||||
</template>
|
||||
<div class="welfare-card__content">
|
||||
<div class="info-row">
|
||||
<div class="info-row__label">项目名称</div>
|
||||
<div class="info-row__value">{{ projectInfo.name }}</div>
|
||||
</div>
|
||||
<div class="info-row info-row--time">
|
||||
<div class="info-row__label">选择时间</div>
|
||||
<div class="info-row__value">
|
||||
<div class="time-item time-item--start">{{
|
||||
$moment(projectInfo.choiceTimeStart).format('YYYY-MM-DD HH:mm')
|
||||
}}
|
||||
</div>
|
||||
<div class="time-item time-item--end">{{
|
||||
$moment(projectInfo.choiceTimeEnd).format('YYYY-MM-DD HH:mm') }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="info-row info-row--time">
|
||||
<div class="info-row__label">发放时间</div>
|
||||
<div class="info-row__value">
|
||||
<div class="time-item time-item--start">{{
|
||||
$moment(projectInfo.provideTimeStart).format('YYYY-MM-DD HH:mm')
|
||||
}}
|
||||
</div>
|
||||
<div class="time-item time-item--end">{{
|
||||
$moment(projectInfo.provideTimeEnd).format('YYYY-MM-DD HH:mm')
|
||||
}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="info-row">
|
||||
<div class="info-row__label">发放地点</div>
|
||||
<div class="info-row__value">{{ projectInfo.provideAddress || '暂无'
|
||||
}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="info-row info-row--time">
|
||||
<div class="info-row__label">发放时间</div>
|
||||
<div class="info-row__value">
|
||||
<div class="time-item time-item--start">{{ projectInfo.provideTimeStart }}</div>
|
||||
<div class="time-item time-item--end">{{ projectInfo.provideTimeEnd }}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="info-row">
|
||||
<div class="info-row__label">发放地点</div>
|
||||
<div class="info-row__value">{{ projectInfo.provideAddress || '暂无' }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</van-collapse-item>
|
||||
</van-collapse>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- 联系信息 -->
|
||||
<div class="welfare-card">
|
||||
<div class="welfare-card__header">
|
||||
@@ -58,7 +79,9 @@ const selectView = {
|
||||
</div>
|
||||
<div class="info-row">
|
||||
<div class="info-row__label">收货地址</div>
|
||||
<div class="info-row__value">{{ mergedSelections[0]?.receiveAddress || '暂无' }}</div>
|
||||
<div class="info-row__value">{{ mergedSelections[0]?.receiveAddress || '暂无'
|
||||
}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -73,11 +96,11 @@ const selectView = {
|
||||
|
||||
<div v-if="mergedSelections.length > 0" class="selection-list">
|
||||
<div class="selection-item"
|
||||
v-for="item in mergedSelections"
|
||||
:key="item.id"
|
||||
@click="showOptionDetail(item)">
|
||||
v-for="item in mergedSelections"
|
||||
:key="item.id"
|
||||
@click="showOptionDetail(item)">
|
||||
<div class="selection-item__image">
|
||||
<img :src="item.imgUrl"
|
||||
<img :src="item.imgUrl"
|
||||
alt="福利图片"
|
||||
@error="handleImageError">
|
||||
</div>
|
||||
@@ -110,16 +133,17 @@ const selectView = {
|
||||
|
||||
<!-- 选项详情弹窗 -->
|
||||
<van-action-sheet
|
||||
v-model="detailVisible"
|
||||
:title="currentOption?.optionName || '福利详情'"
|
||||
close-icon="close"
|
||||
safe-area-inset-bottom
|
||||
@close="closeDetail"
|
||||
:z-index="2001"
|
||||
v-model="detailVisible"
|
||||
:title="currentOption?.optionName || '福利详情'"
|
||||
close-icon="close"
|
||||
safe-area-inset-bottom
|
||||
@close="closeDetail"
|
||||
:z-index="2001"
|
||||
>
|
||||
<div class="welfare-detail" v-if="currentOption">
|
||||
<van-skeleton title :row="10" :loading="descLoading" animated>
|
||||
<div class="welfare-detail__content rich-text" v-html="currentOption.description || '暂无详细说明'"></div>
|
||||
<div class="welfare-detail__content rich-text"
|
||||
v-html="currentOption.description || '暂无详细说明'"></div>
|
||||
</van-skeleton>
|
||||
</div>
|
||||
</van-action-sheet>
|
||||
@@ -144,7 +168,8 @@ const selectView = {
|
||||
},
|
||||
selectedOptions: [],
|
||||
detailVisible: false,
|
||||
currentOption: null
|
||||
currentOption: null,
|
||||
activeNames:[]
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
|
||||
@@ -535,15 +535,16 @@ layout("/layouts/platform_h5.html"){
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<div class="page-container">
|
||||
<van-nav-bar title="福利选择" left-text="返回" left-arrow @click-left="historyBack" fixed placeholder></van-nav-bar>
|
||||
<van-nav-bar title="福利选择" left-text="返回" left-arrow @click-left="historyBack" fixed
|
||||
placeholder></van-nav-bar>
|
||||
|
||||
<!-- 项目头部信息 -->
|
||||
<div class="welfare-header" v-if="projectInfo.id">
|
||||
<img :src="projectInfo.cover" class="welfare-header-img" />
|
||||
<img :src="projectInfo.cover" class="welfare-header-img"/>
|
||||
<div class="welfare-header-overlay">
|
||||
<div class="welfare-title">{{ projectInfo.name }}</div>
|
||||
<div class="welfare-subtitle">
|
||||
<van-icon name="calendar-o" />
|
||||
<van-icon name="calendar-o"/>
|
||||
<span>{{ projectInfo.festival }} · {{ projectInfo.year }}年</span>
|
||||
</div>
|
||||
</div>
|
||||
@@ -552,14 +553,14 @@ layout("/layouts/platform_h5.html"){
|
||||
<!-- 加载中 -->
|
||||
<van-empty v-if="!projectInfo.id" description="加载中...">
|
||||
<template #image>
|
||||
<van-loading type="spinner" color="#1989fa" />
|
||||
<van-loading type="spinner" color="#1989fa"/>
|
||||
</template>
|
||||
</van-empty>
|
||||
|
||||
<div class="main-content" v-if="projectInfo.id">
|
||||
<!-- 截止时间提醒 -->
|
||||
<div class="welfare-deadline" v-if="isDeadlineSoon">
|
||||
<van-icon name="warning-o" />
|
||||
<van-icon name="warning-o"/>
|
||||
<span>选择截止时间即将到期,请尽快选择!</span>
|
||||
</div>
|
||||
|
||||
@@ -567,26 +568,37 @@ layout("/layouts/platform_h5.html"){
|
||||
<div class="welfare-notice">
|
||||
<van-notice-bar wrapable :scrollable="false" background="#ecf6ff" color="var(--primary-color)">
|
||||
<van-icon name="info-o" style="margin-right: 5px"></van-icon>
|
||||
{{ projectInfo.isCheckBox === "radio" ? "请选择一项福利" : "您可以选择多项福利,最多可选 " + (projectInfo.multiSelectNum ||
|
||||
{{ projectInfo.isCheckBox === "radio" ? "请选择一项福利" : "您可以选择多项福利,最多可选 " +
|
||||
(projectInfo.multiSelectNum ||
|
||||
projectInfo.options.length) + " 项" }}
|
||||
</van-notice-bar>
|
||||
</div>
|
||||
|
||||
<!-- 项目信息卡片 -->
|
||||
<div class="welfare-info-card">
|
||||
<div class="welfare-info-header">
|
||||
<div class="header-text">
|
||||
<van-icon name="info-o" />
|
||||
<span>项目信息</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="welfare-cell-group">
|
||||
<van-cell title="选择时间" :value="formatTimeRange(projectInfo.choiceTimeStart, projectInfo.choiceTimeEnd)"></van-cell>
|
||||
<van-cell title="发放时间" :value="formatTimeRange(projectInfo.provideTimeStart, projectInfo.provideTimeEnd)"></van-cell>
|
||||
<van-cell title="发放地点" :value="projectInfo.provideAddress"></van-cell>
|
||||
|
||||
|
||||
<van-collapse v-model="activeNames">
|
||||
<van-collapse-item name="1">
|
||||
<template #title>
|
||||
<div class="welfare-info-header">
|
||||
<div class="header-text">
|
||||
<van-icon name="info-o"></van-icon>
|
||||
<span>项目信息</span>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<div class="welfare-cell-group">
|
||||
<van-cell title="选择时间"
|
||||
:value="formatTimeRange(projectInfo.choiceTimeStart, projectInfo.choiceTimeEnd)"></van-cell>
|
||||
<van-cell title="发放时间"
|
||||
:value="formatTimeRange(projectInfo.provideTimeStart, projectInfo.provideTimeEnd)"></van-cell>
|
||||
<van-cell title="发放地点" :value="projectInfo.provideAddress"></van-cell>
|
||||
</div>
|
||||
</van-collapse-item>
|
||||
<!-- <van-cell title="发放方式" :value="getProvideModeName(projectInfo.provideMode)"></van-cell>-->
|
||||
<!-- <van-cell title="签字方式" :value="getSignModeName(projectInfo.signMode)"></van-cell>-->
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="section-divider"></div>
|
||||
@@ -594,7 +606,7 @@ layout("/layouts/platform_h5.html"){
|
||||
<!-- 福利选项标题 -->
|
||||
<div class="welfare-section-title">
|
||||
<div class="title-text">
|
||||
<van-icon name="gift-o" />
|
||||
<van-icon name="gift-o"/>
|
||||
<span>福利选项</span>
|
||||
<span class="title-count">共 {{ projectInfo.options.length }} 项</span>
|
||||
</div>
|
||||
@@ -603,15 +615,16 @@ layout("/layouts/platform_h5.html"){
|
||||
<!-- 福利选项列表 -->
|
||||
<div class="welfare-options-container">
|
||||
<div
|
||||
v-for="(option,index) in projectInfo.options"
|
||||
:key="option.id"
|
||||
class="welfare-option"
|
||||
:class="{ selected: projectInfo.isCheckBox === 'radio' ? selectedRadioId === option.id : option.selectNum > 0 }"
|
||||
@click="projectInfo.isCheckBox === 'radio' && !isDeadlinePassed ? selectRadioOption(option.id) : null"
|
||||
v-for="(option,index) in projectInfo.options"
|
||||
:key="option.id"
|
||||
class="welfare-option"
|
||||
:class="{ selected: projectInfo.isCheckBox === 'radio' ? selectedRadioId === option.id : option.selectNum > 0 }"
|
||||
@click="projectInfo.isCheckBox === 'radio' && !isDeadlinePassed ? selectRadioOption(option.id) : null"
|
||||
>
|
||||
<div class="welfare-option-image">
|
||||
<van-image :src="option.imgUrl" fit="cover" width="100%" height="100%" radius="4px"></van-image>
|
||||
<div class="welfare-tag" v-if="projectInfo.isCheckBox === 'radio' ? selectedRadioId === option.id : option.selectNum > 0">
|
||||
<div class="welfare-tag"
|
||||
v-if="projectInfo.isCheckBox === 'radio' ? selectedRadioId === option.id : option.selectNum > 0">
|
||||
<van-tag type="primary" round>已选择</van-tag>
|
||||
</div>
|
||||
</div>
|
||||
@@ -621,34 +634,34 @@ layout("/layouts/platform_h5.html"){
|
||||
|
||||
<!-- 查看详情按钮 -->
|
||||
<div class="welfare-detail-btn" @click.stop="showOptionDetail(option)">
|
||||
<van-icon name="info-o" />
|
||||
<van-icon name="info-o"/>
|
||||
<span>查看详情</span>
|
||||
</div>
|
||||
|
||||
<!-- 单选模式使用单选按钮 -->
|
||||
<div class="welfare-option-radio" v-if="projectInfo.isCheckBox === 'radio'">
|
||||
<van-radio
|
||||
:name="option.id"
|
||||
v-model="selectedRadioId"
|
||||
@click.stop="isDeadlinePassed ? $toast.fail('已过选择截止时间,无法修改') : selectRadioOption(option.id)"
|
||||
:disabled="isDeadlinePassed"
|
||||
:name="option.id"
|
||||
v-model="selectedRadioId"
|
||||
@click.stop="isDeadlinePassed ? $toast.fail('已过选择截止时间,无法修改') : selectRadioOption(option.id)"
|
||||
:disabled="isDeadlinePassed"
|
||||
></van-radio>
|
||||
</div>
|
||||
|
||||
<!-- 多选模式使用步进器 -->
|
||||
<div class="welfare-option-checkbox" v-else>
|
||||
<van-stepper
|
||||
:key="'input-number-'+index+'-'+option.selectNumKey|| 0"
|
||||
v-model="option.selectNum"
|
||||
integer
|
||||
disable-input
|
||||
:default-value="0"
|
||||
:min="0"
|
||||
:disabled="isDeadlinePassed"
|
||||
input-width="40px"
|
||||
button-size="22px"
|
||||
@change="selectNumChange(index,option.selectNum)"
|
||||
theme="round"
|
||||
:key="'input-number-'+index+'-'+option.selectNumKey|| 0"
|
||||
v-model="option.selectNum"
|
||||
integer
|
||||
disable-input
|
||||
:default-value="0"
|
||||
:min="0"
|
||||
:disabled="isDeadlinePassed"
|
||||
input-width="40px"
|
||||
button-size="22px"
|
||||
@change="selectNumChange(index,option.selectNum)"
|
||||
theme="round"
|
||||
></van-stepper>
|
||||
</div>
|
||||
</div>
|
||||
@@ -658,13 +671,15 @@ layout("/layouts/platform_h5.html"){
|
||||
|
||||
<!-- 底部提交按钮 -->
|
||||
<div class="welfare-footer" v-if="projectInfo.id">
|
||||
<van-button type="primary" class="welfare-submit-btn" :disabled="submitButtonDisabled" @click="submitSelection" round>
|
||||
<van-button type="primary" class="welfare-submit-btn" :disabled="submitButtonDisabled"
|
||||
@click="submitSelection" round>
|
||||
{{ isDeadlinePassed ? '已截止' : '确认选择' }}
|
||||
</van-button>
|
||||
</div>
|
||||
|
||||
<!-- 确认弹窗 -->
|
||||
<van-action-sheet v-model="showConfirmDialog" :close-on-click-overlay="false" :round="true" :style="{ maxHeight: '90%' }">
|
||||
<van-action-sheet v-model="showConfirmDialog" :close-on-click-overlay="false" :round="true"
|
||||
:style="{ maxHeight: '90%' }">
|
||||
<div class="confirm-action-sheet">
|
||||
<div class="confirm-sheet-title">确认选择</div>
|
||||
|
||||
@@ -672,24 +687,26 @@ layout("/layouts/platform_h5.html"){
|
||||
<!-- 手机号输入 -->
|
||||
<div class="mobile-input-section">
|
||||
<van-field
|
||||
v-model="formData.mobile"
|
||||
label="联系电话"
|
||||
placeholder="请输入手机号码"
|
||||
:error="mobileError"
|
||||
@focus="mobileError = false"
|
||||
maxlength="11"
|
||||
required
|
||||
v-model="formData.mobile"
|
||||
label="联系电话"
|
||||
placeholder="请输入手机号码"
|
||||
:error="mobileError"
|
||||
@focus="mobileError = false"
|
||||
maxlength="11"
|
||||
required
|
||||
></van-field>
|
||||
<!--收货地址-->
|
||||
<van-field
|
||||
v-if="projectInfo.provideMode == 3"
|
||||
v-model="formData.receiveAddress"
|
||||
label="收货地址"
|
||||
placeholder="请选择收货地址"
|
||||
readonly
|
||||
is-link
|
||||
@click="showAddressSheet = true"
|
||||
required
|
||||
v-if="projectInfo.provideMode == 3"
|
||||
v-model="formData.receiveAddress"
|
||||
label="收货地址"
|
||||
rows="4"
|
||||
type="textarea"
|
||||
placeholder="请选择收货地址"
|
||||
readonly
|
||||
is-link
|
||||
@click="showAddressSheet = true"
|
||||
required
|
||||
></van-field>
|
||||
</div>
|
||||
|
||||
@@ -713,7 +730,9 @@ layout("/layouts/platform_h5.html"){
|
||||
<div class="confirm-section" v-if="projectInfo.signMode === 2">
|
||||
<div class="confirm-section-title">请签字确认</div>
|
||||
<h5-signature v-model="formData.userSign" ref="signatureRef"></h5-signature>
|
||||
<div class="signature-tips">{{ formData.userSign ? '您已完成签名' : '请在上方空白区域完成签名' }}</div>
|
||||
<div class="signature-tips">{{ formData.userSign ? '您已完成签名' : '请在上方空白区域完成签名'
|
||||
}}
|
||||
</div>
|
||||
<div style="text-align: right; margin-top: 8px">
|
||||
<van-button size="small" type="default" @click="resetSignature">重新签名</van-button>
|
||||
</div>
|
||||
@@ -721,14 +740,19 @@ layout("/layouts/platform_h5.html"){
|
||||
</div>
|
||||
|
||||
<div class="confirm-fixed-buttons">
|
||||
<van-button type="default" block round class="action-sheet-cancel" @click="showConfirmDialog = false">取消</van-button>
|
||||
<van-button type="primary" block round @click="doSubmit">{{ hasSubmittedBefore ? '确认修改' : '确认提交' }}</van-button>
|
||||
<van-button type="default" block round class="action-sheet-cancel"
|
||||
@click="showConfirmDialog = false">取消
|
||||
</van-button>
|
||||
<van-button type="primary" block round @click="doSubmit">
|
||||
{{ hasSubmittedBefore ? '确认修改' : '确认提交'}}
|
||||
</van-button>
|
||||
</div>
|
||||
</div>
|
||||
</van-action-sheet>
|
||||
|
||||
<!-- 选项详情弹窗 -->
|
||||
<van-popup v-model="showOptionDetailDialog" round closeable close-icon="close" position="bottom" :style="{ maxHeight: '70%' }">
|
||||
<van-popup v-model="showOptionDetailDialog" round closeable close-icon="close" position="bottom"
|
||||
:style="{ maxHeight: '70%' }">
|
||||
<div class="welfare-detail-popup" v-if="selectedOption">
|
||||
<div class="welfare-detail-title">{{ selectedOption.optionName }}</div>
|
||||
<div class="welfare-detail-content" v-html="selectedOption.description"></div>
|
||||
@@ -739,25 +763,29 @@ layout("/layouts/platform_h5.html"){
|
||||
<van-action-sheet v-model="showAddressSheet" title="选择收货地址" :round="true">
|
||||
<div style="padding: 16px 0 0">
|
||||
<div
|
||||
v-for="address in addressOptions"
|
||||
:key="address.id"
|
||||
class="address-item"
|
||||
@click="selectAddress(address)"
|
||||
style="padding: 12px 16px; border-bottom: 1px solid #f0f0f0; cursor: pointer"
|
||||
v-for="address in addressOptions"
|
||||
:key="address.id"
|
||||
class="address-item"
|
||||
@click="selectAddress(address)"
|
||||
style="padding: 12px 16px; border-bottom: 1px solid #f0f0f0; cursor: pointer"
|
||||
>
|
||||
<div style="display: flex; justify-content: space-between; align-items: flex-start">
|
||||
<div style="flex: 1">
|
||||
<div style="font-size: 16px; font-weight: 500; color: #323233; margin-bottom: 4px">
|
||||
{{ address.userName }} {{ address.tel }}
|
||||
收货人:{{ address.userName }}{{ address.tel }}
|
||||
</div>
|
||||
<div style="font-size: 14px; color: #646566; line-height: 1.4">
|
||||
{{ address.province }}{{ address.city }}{{ address.county }}{{ address.addressDetail }}
|
||||
收货地址: {{ address.province }}{{ address.city }}{{ address.county }}
|
||||
{{address.addressDetail }}
|
||||
</div>
|
||||
</div>
|
||||
<van-tag v-if="address.isDefault" type="primary" size="mini" style="margin-left: 8px">默认</van-tag>
|
||||
<van-tag v-if="address.isDefault" type="primary" size="mini" style="margin-left: 8px">默认
|
||||
</van-tag>
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="addressOptions.length === 0" style="text-align: center; padding: 40px 16px; color: #969799">暂无收货地址</div>
|
||||
<div v-if="addressOptions.length === 0" style="text-align: center; padding: 40px 16px; color: #969799">
|
||||
暂无收货地址
|
||||
</div>
|
||||
</div>
|
||||
<div style="padding: 16px; border-top: 1px solid #f0f0f0; background: #fafafa">
|
||||
<van-button type="info" block round @click="goToAddressManage">收货地址管理</van-button>
|
||||
@@ -772,6 +800,7 @@ layout("/layouts/platform_h5.html"){
|
||||
store,
|
||||
data() {
|
||||
return {
|
||||
activeNames: [],
|
||||
projectInfo: {},
|
||||
userSelection: [],
|
||||
welfareProvideMode: [],
|
||||
@@ -879,7 +908,7 @@ layout("/layouts/platform_h5.html"){
|
||||
}
|
||||
},
|
||||
getProjectInfo() {
|
||||
this.$axios.post("/platform/welfare/common/projectInfo", { id: this.projectId }).then((res) => {
|
||||
this.$axios.post("/platform/welfare/common/projectInfo", {id: this.projectId}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.projectInfo = res.data
|
||||
|
||||
@@ -904,7 +933,7 @@ layout("/layouts/platform_h5.html"){
|
||||
|
||||
// 获取用户选择的数据
|
||||
getUserSelection() {
|
||||
this.$axios.post("/platform/welfare/userSelect/getUserSelection", { projectId: this.projectId }).then((resp) => {
|
||||
this.$axios.post("/platform/welfare/userSelect/getUserSelection", {projectId: this.projectId}).then((resp) => {
|
||||
if (resp.code === 0) {
|
||||
this.userSelection = resp.data
|
||||
this.hasSubmittedBefore = this.userSelection.length > 0
|
||||
@@ -1170,7 +1199,7 @@ layout("/layouts/platform_h5.html"){
|
||||
// 选择收货地址
|
||||
selectAddress(address) {
|
||||
this.formData.receiveAddress =
|
||||
address.userName + " " + address.tel + " " + address.province + address.city + address.county + address.addressDetail
|
||||
"收货人:" + address.userName + ",联系电话:" + address.tel + ",收货地址:" + address.province + address.city + address.county + address.addressDetail
|
||||
this.showAddressSheet = false
|
||||
},
|
||||
|
||||
|
||||
@@ -86,11 +86,11 @@ layout("/layouts/platform_h5.html"){
|
||||
<div class="wf-card-heading">{{row.name}}</div>
|
||||
<div class="wf-time-row">
|
||||
<span class="wf-time-label">开始时间:</span>
|
||||
{{row.choiceTimeStart}}
|
||||
{{$moment(row.choiceTimeStart).format('YYYY-MM-DD HH:mm')}}
|
||||
</div>
|
||||
<div class="wf-time-row">
|
||||
<span class="wf-time-label">结束时间:</span>
|
||||
{{row.choiceTimeEnd}}
|
||||
{{$moment(row.choiceTimeEnd).format('YYYY-MM-DD HH:mm')}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user