feat: 优化福利
This commit is contained in:
@@ -17,6 +17,9 @@ layout("/layouts/platform.html"){
|
||||
value-format="yyyy"
|
||||
></el-date-picker>
|
||||
</search-item>
|
||||
<template #actions>
|
||||
<el-button @click="resetSearch">重置</el-button>
|
||||
</template>
|
||||
</search>
|
||||
</el-card>
|
||||
|
||||
@@ -115,6 +118,10 @@ layout("/layouts/platform.html"){
|
||||
"select-view": selectView
|
||||
},
|
||||
methods: {
|
||||
resetSearch() {
|
||||
this.pageForm.year = moment().format("YYYY")
|
||||
this.doSearch()
|
||||
},
|
||||
async openView(row) {
|
||||
this.$refs.selectViewRef.onOpen(row.id)
|
||||
}
|
||||
|
||||
@@ -117,6 +117,9 @@ const filterUser = {
|
||||
<el-option label="否" :value="false"></el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
<template #actions>
|
||||
<el-button @click="resetSearch">重置</el-button>
|
||||
</template>
|
||||
</search>
|
||||
</el-card>
|
||||
|
||||
@@ -200,6 +203,11 @@ const filterUser = {
|
||||
this.pageData()
|
||||
},
|
||||
|
||||
resetSearch() {
|
||||
this.resetPageForm()
|
||||
this.doSearch()
|
||||
},
|
||||
|
||||
resetPageForm() {
|
||||
this.$set(this.pageForm, "userName", null)
|
||||
this.$set(this.pageForm, "loginName", null)
|
||||
|
||||
@@ -21,6 +21,9 @@ layout("/layouts/platform.html"){
|
||||
<search-item label="项目名称">
|
||||
<el-input clearable placeholder="请输入项目名称" v-model="pageForm.name"></el-input>
|
||||
</search-item>
|
||||
<template #actions>
|
||||
<el-button @click="resetSearch">重置</el-button>
|
||||
</template>
|
||||
</search>
|
||||
</el-card>
|
||||
|
||||
@@ -294,6 +297,11 @@ layout("/layouts/platform.html"){
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
resetSearch() {
|
||||
this.pageForm.year = moment().format("YYYY")
|
||||
this.$set(this.pageForm, "name", null)
|
||||
this.doSearch()
|
||||
},
|
||||
dropdownCommand(command) {
|
||||
const { type, data } = command
|
||||
if (type === "edit") {
|
||||
|
||||
@@ -22,6 +22,7 @@ layout("/layouts/platform.html"){
|
||||
</div>
|
||||
<div class="search-query">
|
||||
<el-button @click="doSearch" icon="el-icon-search" type="primary">搜索</el-button>
|
||||
<el-button @click="resetSearch">重置</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</el-card>
|
||||
@@ -120,6 +121,10 @@ layout("/layouts/platform.html"){
|
||||
"option-select": optionSelect
|
||||
},
|
||||
methods: {
|
||||
resetSearch() {
|
||||
this.$set(this.pageForm, "year", null)
|
||||
this.doSearch()
|
||||
},
|
||||
go_back() {
|
||||
this.doSearch()
|
||||
this.$refs.guava.index()
|
||||
|
||||
@@ -34,7 +34,7 @@ const optionSelect = {
|
||||
</div>
|
||||
<div class="info-item">
|
||||
<div class="info-label">节日信息</div>
|
||||
<div class="info-value">{{ projectInfo.festival }} · {{ projectInfo.year }}年</div>
|
||||
<div class="info-value"><!--{{ projectInfo.festival }} · -->{{ projectInfo.year }}年</div>
|
||||
</div>
|
||||
<div class="info-item">
|
||||
<div class="info-label">选择时间</div>
|
||||
@@ -48,10 +48,12 @@ const optionSelect = {
|
||||
projectInfo.provideTimeEnd) }}
|
||||
</div>
|
||||
</div>
|
||||
<!--
|
||||
<div class="info-item">
|
||||
<div class="info-label">发放地点</div>
|
||||
<div class="info-value">{{ projectInfo.provideAddress }}</div>
|
||||
</div>
|
||||
-->
|
||||
</div>
|
||||
</el-card>
|
||||
|
||||
@@ -143,8 +145,15 @@ 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 label="领取方式" v-if="projectInfo.provideMode === 3">
|
||||
<el-radio-group v-model="deliveryMethod">
|
||||
<el-radio-button label="pickup">学校自提</el-radio-button>
|
||||
<el-radio-button label="mail">邮寄</el-radio-button>
|
||||
</el-radio-group>
|
||||
<div style="margin-top: 8px; padding: 8px 12px; border-radius: 6px; line-height: 1.5; background: #fff3e8; color: #9c451c">超出江浙沪不包邮,超出部分自理,具体金额联系供应商。</div>
|
||||
</el-form-item>
|
||||
<el-row :gutter="10">
|
||||
<el-col :span="20" v-if="projectInfo.provideMode == 3">
|
||||
<el-col :span="20" v-if="projectInfo.provideMode === 3 && deliveryMethod === 'mail'">
|
||||
<el-form-item prop="receiveAddress"
|
||||
label="收货地址"
|
||||
:rules="[{ required: true, message: '请选择收货地址', trigger: 'change' }]">
|
||||
@@ -158,10 +167,10 @@ const optionSelect = {
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4" v-if="projectInfo.provideMode == 3">
|
||||
<el-col :span="4" v-if="projectInfo.provideMode === 3 && deliveryMethod === 'mail'">
|
||||
<el-button @click="openAddress" type="primary" size="small">添加地址</el-button>
|
||||
</el-col>
|
||||
<el-col :span="24" v-if="projectInfo.provideMode == 3">
|
||||
<el-col :span="24" v-if="projectInfo.provideMode === 3 && deliveryMethod === 'mail'">
|
||||
<el-form-item prop="userName" label="收货人">
|
||||
<el-input
|
||||
v-model="contactForm.userName"
|
||||
@@ -170,7 +179,7 @@ const optionSelect = {
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-col :span="24" v-if="projectInfo.provideMode !== 3 || deliveryMethod === 'mail'">
|
||||
<el-form-item prop="mobile" label="联系电话">
|
||||
<el-input
|
||||
v-model="contactForm.mobile"
|
||||
@@ -258,6 +267,7 @@ const optionSelect = {
|
||||
userSelection: [], // 用户选择的选项
|
||||
selectedRadioId: "", // 单选模式下选中的选项ID
|
||||
showConfirmDialog: false, // 确认弹窗
|
||||
deliveryMethod: "",
|
||||
isSubmitting: false, // 是否正在提交
|
||||
hasSubmittedBefore: false, // 是否之前提交过
|
||||
deadlineTime: null, // 选择截止时间
|
||||
@@ -410,6 +420,7 @@ const optionSelect = {
|
||||
this.projectId = projectId
|
||||
this.userId = userId
|
||||
|
||||
this.deliveryMethod = ""
|
||||
this.selectedRadioId = null
|
||||
this.contactForm = {
|
||||
mobile: "",
|
||||
@@ -485,7 +496,9 @@ const optionSelect = {
|
||||
// 地址回显
|
||||
if (this.projectInfo.provideMode === 3) {
|
||||
if (this.userSelection.length > 0 && this.userSelection[0].receiveAddress) {
|
||||
this.contactForm.receiveAddress = this.userSelection[0].receiveAddress
|
||||
const receiveAddress = this.userSelection[0].receiveAddress
|
||||
this.deliveryMethod = receiveAddress === "学校自提" ? "pickup" : "mail"
|
||||
this.contactForm.receiveAddress = this.deliveryMethod === "mail" ? receiveAddress : ""
|
||||
// this.contactForm.userName = this.userSelection[0].userName;
|
||||
// this.contactForm.mobile = this.userSelection[0].mobile;
|
||||
this.$set(this.contactForm, "userName", this.userSelection[0].userName)
|
||||
@@ -526,6 +539,10 @@ const optionSelect = {
|
||||
|
||||
// 执行提交
|
||||
doSubmit() {
|
||||
if (this.projectInfo.provideMode === 3 && !this.deliveryMethod) {
|
||||
this.$message.warning("请选择领取方式")
|
||||
return
|
||||
}
|
||||
// 验证手机号
|
||||
this.$refs.contactForm.validate((valid) => {
|
||||
if (!valid) {
|
||||
@@ -547,7 +564,7 @@ const optionSelect = {
|
||||
mobile: this.contactForm.mobile,
|
||||
userName: this.contactForm.userName,
|
||||
userSign: this.contactForm.userSign,
|
||||
receiveAddress: this.contactForm.receiveAddress
|
||||
receiveAddress: this.deliveryMethod === "pickup" ? "学校自提" : this.contactForm.receiveAddress
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -560,7 +577,7 @@ const optionSelect = {
|
||||
mobile: this.contactForm.mobile,
|
||||
userName: this.contactForm.userName,
|
||||
userSign: this.contactForm.userSign,
|
||||
receiveAddress: this.contactForm.receiveAddress
|
||||
receiveAddress: this.deliveryMethod === "pickup" ? "学校自提" : this.contactForm.receiveAddress
|
||||
}))
|
||||
}
|
||||
|
||||
|
||||
@@ -69,6 +69,9 @@ layout("/layouts/platform.html"){
|
||||
<dict-select v-model="pageForm.userAttribute" placeholder="请选择人员属性" @change="doSearch"
|
||||
code="USER_ATTRIBUTE"></dict-select>
|
||||
</search-item>
|
||||
<template #actions>
|
||||
<el-button @click="resetSearch">重置</el-button>
|
||||
</template>
|
||||
</search>
|
||||
</el-card>
|
||||
|
||||
@@ -173,6 +176,18 @@ layout("/layouts/platform.html"){
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
resetSearch() {
|
||||
this.pageForm.year = new Date().getFullYear().toString()
|
||||
this.$set(this.pageForm, "welfareOptionId", null)
|
||||
this.$set(this.pageForm, "userName", null)
|
||||
this.$set(this.pageForm, "loginName", null)
|
||||
this.$set(this.pageForm, "unionId", null)
|
||||
this.$set(this.pageForm, "aidFundMemberUserType", null)
|
||||
this.$set(this.pageForm, "userAttribute", null)
|
||||
this.$set(this.pageForm, "isSelect", null)
|
||||
this.$set(this.pageForm, "unitIds", [])
|
||||
this.getWelfareList()
|
||||
},
|
||||
// 获取福利列表
|
||||
getWelfareList() {
|
||||
this.$axios.post("/platform/welfare/common/list", { year: this.pageForm.year }).then((res) => {
|
||||
|
||||
@@ -28,6 +28,9 @@ layout("/layouts/platform.html"){
|
||||
<el-option :key="item.id" :label="item.name" :value="item.id" v-for="item in unionOptions"></el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
<template #actions>
|
||||
<el-button @click="resetSearch">重置</el-button>
|
||||
</template>
|
||||
</search>
|
||||
</el-card>
|
||||
|
||||
@@ -110,6 +113,13 @@ layout("/layouts/platform.html"){
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
resetSearch() {
|
||||
this.pageForm.year = new Date().getFullYear().toString()
|
||||
const isBranchChairman = !this.$auth.hasRoleOr(["SYSADMIN", "SCHOOL_UNION_ADMIN", "SCHOOL_UNION_WELFARE_ADMIN"]) &&
|
||||
this.$auth.hasRoleOr(["BRANCH_UNION_CHAIRMAN"])
|
||||
this.$set(this.pageForm, "unionId", isBranchChairman ? this.$store.state.user.union.id : null)
|
||||
this.getWelfareProjectList()
|
||||
},
|
||||
remindUnSelectedPlaceholder() {
|
||||
this.$message.info("提醒未选择人员功能待开发")
|
||||
},
|
||||
|
||||
@@ -112,7 +112,15 @@ let CHOOSE_WELFARE = {
|
||||
</el-row>
|
||||
</el-form-item>
|
||||
|
||||
<template v-if="projectInfo.provideMode===3">
|
||||
<div v-if="projectInfo.provideMode === 3 && !is_view" style="padding: 8px 16px">
|
||||
<div>领取方式</div>
|
||||
<el-radio-group v-model="deliveryMethod">
|
||||
<el-radio-button label="pickup">学校自提</el-radio-button>
|
||||
<el-radio-button label="mail">邮寄</el-radio-button>
|
||||
</el-radio-group>
|
||||
<div style="margin-top: 8px; padding: 8px; background: #fff3e8; color: #9c451c">超出江浙沪不包邮,超出部分自理,具体金额联系供应商。</div>
|
||||
</div>
|
||||
<template v-if="projectInfo.provideMode === 3 && (is_view || deliveryMethod === 'mail')">
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="24" v-if="!is_view">
|
||||
<el-form-item label="收货地址" prop="receiveAddress">
|
||||
@@ -202,6 +210,7 @@ let CHOOSE_WELFARE = {
|
||||
data() {
|
||||
return {
|
||||
projectInfo: {},
|
||||
deliveryMethod: "",
|
||||
addressOptions: [],
|
||||
welfareProvideMode: [],
|
||||
welfareSignMode: [],
|
||||
@@ -295,6 +304,10 @@ let CHOOSE_WELFARE = {
|
||||
}
|
||||
},
|
||||
doChoose() {
|
||||
if (this.projectInfo.provideMode === 3 && !this.deliveryMethod) {
|
||||
this.$message.warning("请选择领取方式")
|
||||
return
|
||||
}
|
||||
this.$refs["addForm"].validate(async (valid) => {
|
||||
if (valid) {
|
||||
const {
|
||||
@@ -309,7 +322,7 @@ let CHOOSE_WELFARE = {
|
||||
return
|
||||
}
|
||||
}
|
||||
if (this.formData.receiveAddress == null || this.formData.receiveAddress === "") {
|
||||
if (this.projectInfo.provideMode === 3 && this.deliveryMethod === "mail" && !this.formData.receiveAddress) {
|
||||
this.$message.warning("请填写收货地址")
|
||||
return
|
||||
}
|
||||
@@ -322,7 +335,7 @@ let CHOOSE_WELFARE = {
|
||||
welfareId: this.projectInfo.id,
|
||||
subjectId: v.subjectId,
|
||||
selectOptionId: v.id,
|
||||
receiveAddress: this.formData.receiveAddress,
|
||||
receiveAddress: this.deliveryMethod === "pickup" ? "学校自提" : this.formData.receiveAddress,
|
||||
userSign: this.formData.userSign,
|
||||
selectNum: v.selectNum
|
||||
}
|
||||
@@ -397,12 +410,19 @@ let CHOOSE_WELFARE = {
|
||||
},
|
||||
async openChoose(row) {
|
||||
await this.getProjectInfo(row.id)
|
||||
this.deliveryMethod = ""
|
||||
this.$set(this.formData, "receiveAddress", null)
|
||||
this.$set(this.formData, "addressId", null)
|
||||
this.$set(this.formData, "userName", this.$store.state.user.username)
|
||||
this.$set(this.formData, "tel", this.$store.state.user.mobile)
|
||||
|
||||
//如果已选择
|
||||
if (row.isChoose > 0) {
|
||||
this.$set(this.formData, "receiveAddress", this.userSelection[0].receiveAddress)
|
||||
const receiveAddress = this.userSelection[0].receiveAddress
|
||||
if (this.projectInfo.provideMode === 3 && receiveAddress) {
|
||||
this.deliveryMethod = receiveAddress === "学校自提" ? "pickup" : "mail"
|
||||
}
|
||||
this.$set(this.formData, "receiveAddress", this.deliveryMethod === "pickup" && !this.is_view ? null : receiveAddress)
|
||||
this.$set(this.formData, "addressId", null)
|
||||
this.$set(this.formData, "userSign", this.userSelection[0].userSign)
|
||||
} else {
|
||||
|
||||
@@ -22,6 +22,7 @@ layout("/layouts/platform.html"){
|
||||
</div>
|
||||
<div class="search-query">
|
||||
<el-button @click="doSearch" icon="el-icon-search" type="primary">搜索</el-button>
|
||||
<el-button @click="resetSearch">重置</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</el-card>
|
||||
@@ -120,6 +121,10 @@ layout("/layouts/platform.html"){
|
||||
"choose-welfare": CHOOSE_WELFARE
|
||||
},
|
||||
methods: {
|
||||
resetSearch() {
|
||||
this.$set(this.pageForm, "year", null)
|
||||
this.doSearch()
|
||||
},
|
||||
go_back() {
|
||||
this.doSearch()
|
||||
this.$refs.guava.index()
|
||||
|
||||
@@ -138,6 +138,9 @@ layout("/layouts/platform.html"){
|
||||
<!-- <el-option :key="item.id" :label="item.optionName" :value="item.id" v-for="item in pageFormProject"></el-option>-->
|
||||
<!-- </el-select>-->
|
||||
<!-- </search-item>-->
|
||||
<template #actions>
|
||||
<el-button @click="resetSearch">重置</el-button>
|
||||
</template>
|
||||
</search>
|
||||
</el-card>
|
||||
|
||||
@@ -311,6 +314,22 @@ layout("/layouts/platform.html"){
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
resetSearch() {
|
||||
this.pageForm.year = new Date().getFullYear().toString()
|
||||
this.$set(this.pageForm, "userName", null)
|
||||
this.$set(this.pageForm, "loginName", null)
|
||||
this.$set(this.pageForm, "sex", null)
|
||||
this.$set(this.pageForm, "birthday", null)
|
||||
this.$set(this.pageForm, "unionId", null)
|
||||
this.$set(this.pageForm, "aidFundMemberUserType", null)
|
||||
this.$set(this.pageForm, "birthMonths", [])
|
||||
this.$set(this.pageForm, "unitIds", [])
|
||||
this.$set(this.pageForm, "personTypes", [])
|
||||
this.$set(this.pageForm, "userStates", [])
|
||||
this.$set(this.pageForm, "userAttributes", [])
|
||||
this.unitIdsChange([])
|
||||
this.getWelfareList()
|
||||
},
|
||||
// 导出名单
|
||||
openExport() {
|
||||
this.$downLoad("/platform/welfare/list/mange/exportXlsx", {
|
||||
@@ -432,6 +451,9 @@ layout("/layouts/platform.html"){
|
||||
}
|
||||
try {
|
||||
const responses = await Promise.all(unitIds.map((unitId) => this.$axios.post("/platform/sys/unit/child", { pid: unitId })))
|
||||
if (unitIds !== this.pageForm.unitIds) {
|
||||
return
|
||||
}
|
||||
const failedResponse = responses.find((res) => res.code !== 0)
|
||||
if (failedResponse) {
|
||||
this.$message.error(failedResponse.msg || "三级单位查询失败")
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -227,8 +227,16 @@ layout("/layouts/platform_h5.html"){
|
||||
></van-card>
|
||||
</van-cell>
|
||||
|
||||
<div v-if="projectInfo.provideMode === 3" style="padding: 8px 16px">
|
||||
<div>领取方式</div>
|
||||
<van-radio-group v-model="deliveryMethod" direction="horizontal">
|
||||
<van-radio name="pickup">学校自提</van-radio>
|
||||
<van-radio name="mail">邮寄</van-radio>
|
||||
</van-radio-group>
|
||||
<div style="margin-top: 8px; padding: 8px; background: #fff3e8; color: #9c451c">超出江浙沪不包邮,超出部分自理,具体金额联系供应商。</div>
|
||||
</div>
|
||||
<!--邮寄到家 填写收货地址-->
|
||||
<van-cell @click="selectAddressPopup = true" class="confirmWelfareCell" is-link v-if="projectInfo.provideMode===3">
|
||||
<van-cell @click="selectAddressPopup = true" class="confirmWelfareCell" is-link v-if="projectInfo.provideMode === 3 && deliveryMethod === 'mail'">
|
||||
<van-icon class="van-cell__left-icon" color="red" name="info" slot="icon"></van-icon>
|
||||
<div slot="title" style="font-weight: bold; font-size: 15px">收货地址</div>
|
||||
<template #label>
|
||||
@@ -287,6 +295,7 @@ layout("/layouts/platform_h5.html"){
|
||||
descPopup: false,
|
||||
confirmPopup: false,
|
||||
selectAddressPopup: false,
|
||||
deliveryMethod: "",
|
||||
selectAddress: null,
|
||||
addressList: [],
|
||||
userSign: ""
|
||||
@@ -427,7 +436,11 @@ layout("/layouts/platform_h5.html"){
|
||||
|
||||
//回显用户的地址
|
||||
if (this.projectInfo.provideMode === 3 && this.isSelect && this.userSelection) {
|
||||
this.selectAddress = this.userSelection[0].receiveAddress
|
||||
const receiveAddress = this.userSelection[0].receiveAddress
|
||||
if (receiveAddress) {
|
||||
this.deliveryMethod = receiveAddress === "学校自提" ? "pickup" : "mail"
|
||||
}
|
||||
this.selectAddress = this.deliveryMethod === "mail" ? receiveAddress : null
|
||||
}
|
||||
|
||||
//回显用户签名
|
||||
@@ -466,8 +479,12 @@ layout("/layouts/platform_h5.html"){
|
||||
},
|
||||
//提交选择
|
||||
async submitSelect() {
|
||||
if (this.projectInfo.provideMode === 3 && !this.deliveryMethod) {
|
||||
this.$toast("请选择领取方式")
|
||||
return
|
||||
}
|
||||
if (this.projectInfo.provideMode === 3) {
|
||||
if (this.selectAddress == null || this.selectAddress === "") {
|
||||
if (this.deliveryMethod === "mail" && !this.selectAddress) {
|
||||
this.$toast("请填写您的收货地址")
|
||||
return
|
||||
}
|
||||
@@ -491,7 +508,7 @@ layout("/layouts/platform_h5.html"){
|
||||
welfareId: this.projectInfo.id,
|
||||
subjectId: v.subjectId,
|
||||
selectOptionId: v.id,
|
||||
receiveAddress: this.selectAddress,
|
||||
receiveAddress: this.deliveryMethod === "pickup" ? "学校自提" : this.selectAddress,
|
||||
selectNum: v.selectNum,
|
||||
userSign: this.userSign
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user