commit
This commit is contained in:
@@ -1,13 +1,16 @@
|
|||||||
package io.v.nutz.zhgh.mobile.welfare;
|
package io.v.nutz.zhgh.mobile.welfare;
|
||||||
|
|
||||||
|
import cn.hutool.core.util.StrUtil;
|
||||||
import cn.wizzer.framework.page.Pagination;
|
import cn.wizzer.framework.page.Pagination;
|
||||||
import io.v.nutz.base.annontation.ViReturn;
|
import io.v.nutz.base.annontation.ViReturn;
|
||||||
|
import io.v.nutz.base.result.Result;
|
||||||
import io.v.nutz.base.service.SimpleService;
|
import io.v.nutz.base.service.SimpleService;
|
||||||
import io.v.nutz.base.utils.DateUtil;
|
import io.v.nutz.base.utils.DateUtil;
|
||||||
import io.v.nutz.base.query.PageForm;
|
import io.v.nutz.base.query.PageForm;
|
||||||
import io.v.nutz.base.utils.Vi;
|
import io.v.nutz.base.utils.Vi;
|
||||||
import io.v.nutz.web.commons.utils.ShiroUtil;
|
import io.v.nutz.web.commons.utils.ShiroUtil;
|
||||||
import io.v.nutz.zhgh.welfare.mode.WelfareProvideMode;
|
import io.v.nutz.zhgh.welfare.mode.WelfareProvideMode;
|
||||||
|
import io.v.nutz.zhgh.welfare.model.WelfareList;
|
||||||
import io.v.nutz.zhgh.welfare.model.WelfareProject;
|
import io.v.nutz.zhgh.welfare.model.WelfareProject;
|
||||||
import io.v.nutz.zhgh.welfare.model.WelfareProjectSubject;
|
import io.v.nutz.zhgh.welfare.model.WelfareProjectSubject;
|
||||||
import io.v.nutz.zhgh.welfare.model.WelfareProjectSubjectOption;
|
import io.v.nutz.zhgh.welfare.model.WelfareProjectSubjectOption;
|
||||||
@@ -28,6 +31,7 @@ import org.nutz.lang.util.NutMap;
|
|||||||
import org.nutz.mvc.annotation.At;
|
import org.nutz.mvc.annotation.At;
|
||||||
import org.nutz.mvc.annotation.Ok;
|
import org.nutz.mvc.annotation.Ok;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -178,5 +182,31 @@ public class MWelfareController {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取用户积分是否满足
|
||||||
|
*
|
||||||
|
* @param projectId
|
||||||
|
* @param totalIntegral
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@At
|
||||||
|
public Result validateUserIntegral(String projectId, String totalIntegral) {
|
||||||
|
BigDecimal totalIntegralBig = new BigDecimal(totalIntegral);
|
||||||
|
if (StrUtil.isBlank(projectId)) {
|
||||||
|
return Result.error("数据错误!");
|
||||||
|
}
|
||||||
|
WelfareList welfareList = dao.fetch(WelfareList.class, Cnd.where("projectId", "=", projectId).and("userId", "=", ShiroUtil.getPrincipalProperty("id")));
|
||||||
|
if (welfareList == null) {
|
||||||
|
return Result.error("您暂无此福利!");
|
||||||
|
}
|
||||||
|
WelfareProject project = simpleService.dao().fetch(WelfareProject.class, projectId);
|
||||||
|
|
||||||
|
totalIntegralBig = totalIntegralBig.divide(BigDecimal.valueOf(100));
|
||||||
|
if (project.getAllIntegral().compareTo(totalIntegralBig) < 0) {
|
||||||
|
return Result.error("您的积分不足!");
|
||||||
|
}
|
||||||
|
return Result.success();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -162,7 +162,7 @@ public class ShoppingTypeApplyController {
|
|||||||
ShoppingType shoppingType = baseService.dao().fetch(ShoppingType.class, shoppingId);
|
ShoppingType shoppingType = baseService.dao().fetch(ShoppingType.class, shoppingId);
|
||||||
for (WelfareProjectSubjectOption option : welfareProjectSubjectOption) {
|
for (WelfareProjectSubjectOption option : welfareProjectSubjectOption) {
|
||||||
// option.setShoppingName(shoppingType.getShoppingName());
|
// option.setShoppingName(shoppingType.getShoppingName());
|
||||||
// option.setShoppingId(shoppingId);
|
option.setShoppingId(shoppingId);
|
||||||
option.setOptionType("套餐");
|
option.setOptionType("套餐");
|
||||||
option.setSubjectId(projectSubject.getId());
|
option.setSubjectId(projectSubject.getId());
|
||||||
}
|
}
|
||||||
@@ -255,12 +255,34 @@ public class ShoppingTypeApplyController {
|
|||||||
|
|
||||||
String SqlChooseUserByStoreId = """
|
String SqlChooseUserByStoreId = """
|
||||||
SELECT
|
SELECT
|
||||||
su.id,su.username,su.loginname,wpus.selectTime,su.unionname
|
CASE
|
||||||
|
|
||||||
|
WHEN
|
||||||
|
wus.selectUserId IS NOT NULL THEN
|
||||||
|
1 ELSE 0
|
||||||
|
END AS isChoose,
|
||||||
|
wl.id,
|
||||||
|
wl.unionid,
|
||||||
|
wl.username,
|
||||||
|
wl.loginname,
|
||||||
|
wl.personType,
|
||||||
|
wl.userState,
|
||||||
|
wl.unionname,
|
||||||
|
wl.unitname,
|
||||||
|
wl.listId,
|
||||||
|
wus.userSign,
|
||||||
|
wus.courierNumber,
|
||||||
|
GROUP_CONCAT( DISTINCT
|
||||||
|
IF
|
||||||
|
( wus.receiveAddress IS NOT NULL AND wus.receiveAddress != '', wus.receiveAddress, '' )
|
||||||
|
) AS receiveAddress,
|
||||||
|
GROUP_CONCAT( DISTINCT wuso.optionName, '(', wus.selectNum, '份)' ) AS gist_list
|
||||||
FROM
|
FROM
|
||||||
`welfare_project_user_selection` wpus
|
view_welfare_list wl
|
||||||
LEFT JOIN welfare_project wp ON wpus.welfareId=wp.id
|
LEFT JOIN welfare_project_user_selection wus ON wus.welfareId = wl.projectId
|
||||||
LEFT JOIN welfare_project_subject_option wpso ON wpus.selectOptionId = wpso.id
|
AND wus.selectUserId = wl.id
|
||||||
LEFT JOIN `user` su ON su.id=wpus.selectUserId
|
LEFT JOIN welfare_project_subject_option wuso ON wus.selectOptionId = wuso.id
|
||||||
|
LEFT JOIN welfare_project wp ON wp.id = wus.welfareId
|
||||||
$condition
|
$condition
|
||||||
""";
|
""";
|
||||||
|
|
||||||
@@ -278,40 +300,15 @@ public class ShoppingTypeApplyController {
|
|||||||
|
|
||||||
Sql sql = Sqls.create(SqlChooseUserByStoreId);
|
Sql sql = Sqls.create(SqlChooseUserByStoreId);
|
||||||
Cnd cnd = Cnd.NEW();
|
Cnd cnd = Cnd.NEW();
|
||||||
cnd.and("wpso.shoppingId", "=", id);
|
cnd.and("wuso.shoppingId", "=", id);
|
||||||
cnd.andEX("wp.schoolWelfareId", "=", schoolWelfareId);
|
cnd.andEX("wp.schoolWelfareId", "=", schoolWelfareId);
|
||||||
cnd.and("wp.choiceTimeEnd", "<", DateUtil.now());
|
cnd.and("wp.choiceTimeEnd", "<", DateUtil.now());
|
||||||
cnd.andEX("su.unionId", "=", unionId);
|
cnd.andEX("wl.unionId", "=", unionId);
|
||||||
cnd.groupBy("su.id");
|
cnd.groupBy("wl.id");
|
||||||
cnd.asc("wpso.optionName");
|
cnd.asc("wuso.optionName");
|
||||||
cnd.asc("su.loginname");
|
cnd.asc("wl.loginname");
|
||||||
sql.setCondition(cnd);
|
sql.setCondition(cnd);
|
||||||
Pagination pagination = baseService.listPageMap(page.getPageNumber(), page.getPageSize(), sql);
|
Pagination pagination = baseService.listPageMap(page.getPageNumber(), page.getPageSize(), sql);
|
||||||
List<NutMap> list = pagination.getList();
|
|
||||||
list.forEach(v -> {
|
|
||||||
Sql sql_gift = Sqls.create("""
|
|
||||||
select wpus.id,wpso.optionName,wpus.receiveAddress from welfare_project_user_selection wpus
|
|
||||||
left join welfare_project_subject_option wpso on wpso.id = wpus.selectOptionId
|
|
||||||
where wpus.selectUserId = @uid and wpso.shoppingId=@shoppingId
|
|
||||||
""");
|
|
||||||
sql_gift.setParam("uid", v.getString("id"));
|
|
||||||
sql_gift.setParam("shoppingId", id);
|
|
||||||
List<NutMap> gift_list = baseService.listMap(sql_gift);
|
|
||||||
if (Lang.isNotEmpty(gift_list)) {
|
|
||||||
v.put("gist_list", gift_list.stream().map(x -> x.getString("optionName")).collect(Collectors.joining("、")));
|
|
||||||
|
|
||||||
if (!gift_list.stream().findFirst().get().getString("receiveAddress").contains("undefined")) {
|
|
||||||
v.put("receiveAddress", gift_list.stream().findFirst().get().getString("receiveAddress"));
|
|
||||||
} else {
|
|
||||||
v.put("receiveAddress", "");
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
v.put("gist_list", "");
|
|
||||||
v.put("receiveAddress", "");
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
|
|
||||||
return pagination;
|
return pagination;
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -323,37 +320,15 @@ public class ShoppingTypeApplyController {
|
|||||||
|
|
||||||
Sql sql = Sqls.create(SqlChooseUserByStoreId);
|
Sql sql = Sqls.create(SqlChooseUserByStoreId);
|
||||||
Cnd cnd = Cnd.NEW();
|
Cnd cnd = Cnd.NEW();
|
||||||
cnd.and("wpso.shoppingId", "=", id);
|
cnd.and("wuso.shoppingId", "=", id);
|
||||||
cnd.andEX("wp.schoolWelfareId", "=", schoolWelfareId);
|
cnd.andEX("wp.schoolWelfareId", "=", schoolWelfareId);
|
||||||
cnd.and("wp.choiceTimeEnd", "<", DateUtil.now());
|
cnd.and("wp.choiceTimeEnd", "<", DateUtil.now());
|
||||||
cnd.andEX("su.unionId", "=", unionId);
|
cnd.andEX("wl.unionId", "=", unionId);
|
||||||
cnd.groupBy("su.id");
|
cnd.groupBy("wl.id");
|
||||||
cnd.asc("wpso.optionName");
|
cnd.asc("wuso.optionName");
|
||||||
cnd.asc("su.loginname");
|
cnd.asc("wl.loginname");
|
||||||
sql.setCondition(cnd);
|
sql.setCondition(cnd);
|
||||||
List<NutMap> list = baseService.listMap(sql);
|
List<NutMap> list = baseService.listMap(sql);
|
||||||
list.forEach(v -> {
|
|
||||||
Sql sql_gift = Sqls.create("""
|
|
||||||
select wpus.id,wpso.optionName,wpus.receiveAddress from welfare_project_user_selection wpus
|
|
||||||
left join welfare_project_subject_option wpso on wpso.id = wpus.selectOptionId
|
|
||||||
where wpus.selectUserId = @uid and wpso.shoppingId=@shoppingId
|
|
||||||
""");
|
|
||||||
sql_gift.setParam("uid", v.getString("id"));
|
|
||||||
sql_gift.setParam("shoppingId", id);
|
|
||||||
List<NutMap> gift_list = baseService.listMap(sql_gift);
|
|
||||||
if (Lang.isNotEmpty(gift_list)) {
|
|
||||||
v.put("gist_list", gift_list.stream().map(x -> x.getString("optionName")).collect(Collectors.joining("、")));
|
|
||||||
|
|
||||||
if (!gift_list.stream().findFirst().get().getString("receiveAddress").contains("undefined")) {
|
|
||||||
v.put("receiveAddress", gift_list.stream().findFirst().get().getString("receiveAddress"));
|
|
||||||
} else {
|
|
||||||
v.put("receiveAddress", "");
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
v.put("gist_list", "");
|
|
||||||
v.put("receiveAddress", "");
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
List<ExcelExportEntity> entityList = new ArrayList<>();
|
List<ExcelExportEntity> entityList = new ArrayList<>();
|
||||||
entityList.add(new ExcelExportEntity("工号", "loginname", 20));
|
entityList.add(new ExcelExportEntity("工号", "loginname", 20));
|
||||||
|
|||||||
@@ -191,6 +191,7 @@ public class WelfareProjectMangeController {
|
|||||||
optionChain.add("isSystemDefault", o.getIsSystemDefault());
|
optionChain.add("isSystemDefault", o.getIsSystemDefault());
|
||||||
optionChain.add("optionSort", o.getOptionSort());
|
optionChain.add("optionSort", o.getOptionSort());
|
||||||
optionChain.add("imgUrl", o.getImgUrl());
|
optionChain.add("imgUrl", o.getImgUrl());
|
||||||
|
optionChain.add("integral", o.getIntegral());
|
||||||
optionChain.add("description", o.getDescription());
|
optionChain.add("description", o.getDescription());
|
||||||
optionChain.add("shoppingId", o.getShoppingId());
|
optionChain.add("shoppingId", o.getShoppingId());
|
||||||
optionChain.add("shoppingName", o.getShoppingName());
|
optionChain.add("shoppingName", o.getShoppingName());
|
||||||
@@ -234,7 +235,6 @@ public class WelfareProjectMangeController {
|
|||||||
// }
|
// }
|
||||||
}
|
}
|
||||||
dao.update(project);
|
dao.update(project);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
dao.clear(WelfareMemberUnionConfirm.class, Cnd.where("projectId","=",project.getId()));
|
dao.clear(WelfareMemberUnionConfirm.class, Cnd.where("projectId","=",project.getId()));
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ import io.v.nutz.sys.services.SysUserService;
|
|||||||
import io.v.nutz.web.commons.slog.annotation.SLog;
|
import io.v.nutz.web.commons.slog.annotation.SLog;
|
||||||
import io.v.nutz.web.commons.utils.ShiroUtil;
|
import io.v.nutz.web.commons.utils.ShiroUtil;
|
||||||
import io.v.nutz.zhgh.welfare.model.WelfareList;
|
import io.v.nutz.zhgh.welfare.model.WelfareList;
|
||||||
|
import io.v.nutz.zhgh.welfare.model.WelfareProject;
|
||||||
import io.v.nutz.zhgh.welfare.model.WelfareUserSelection;
|
import io.v.nutz.zhgh.welfare.model.WelfareUserSelection;
|
||||||
import io.v.nutz.zhgh.welfare.service.WelfareProjectService;
|
import io.v.nutz.zhgh.welfare.service.WelfareProjectService;
|
||||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||||
@@ -29,6 +30,7 @@ import org.nutz.mvc.annotation.At;
|
|||||||
import org.nutz.mvc.annotation.Ok;
|
import org.nutz.mvc.annotation.Ok;
|
||||||
import org.nutz.mvc.annotation.Param;
|
import org.nutz.mvc.annotation.Param;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@@ -107,7 +109,7 @@ public class WelfareUserChooseController {
|
|||||||
@SLog(type = "welfare", tag = "pc电脑选福利", msg = "福利")
|
@SLog(type = "welfare", tag = "pc电脑选福利", msg = "福利")
|
||||||
@RequiresPermissions("welfare.user.choose")
|
@RequiresPermissions("welfare.user.choose")
|
||||||
public Object doChoose(String chooseIds, String projectId, String subjectId, String receiveAddress,
|
public Object doChoose(String chooseIds, String projectId, String subjectId, String receiveAddress,
|
||||||
@Param(value = "mobile",required = false) String mobile) {
|
@Param(value = "mobile", required = false) String mobile) {
|
||||||
try {
|
try {
|
||||||
lock.lock();
|
lock.lock();
|
||||||
String userId = ShiroUtil.getUserId();
|
String userId = ShiroUtil.getUserId();
|
||||||
@@ -159,15 +161,44 @@ public class WelfareUserChooseController {
|
|||||||
@SLog(type = "welfare", tag = "选择福利", msg = "福利")
|
@SLog(type = "welfare", tag = "选择福利", msg = "福利")
|
||||||
@RequiresPermissions("welfare.user.choose")
|
@RequiresPermissions("welfare.user.choose")
|
||||||
public Result confirmSelect(@Param("welfareUserSelections") WelfareUserSelection[] welfareUserSelections,
|
public Result confirmSelect(@Param("welfareUserSelections") WelfareUserSelection[] welfareUserSelections,
|
||||||
String projectId, @Param(value = "mobile",required = false) String mobile) {
|
String totalIntegral,
|
||||||
|
String projectId, @Param(value = "mobile", required = false) String mobile) {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
lock.lock();
|
lock.lock();
|
||||||
|
WelfareProject project = simpleService.dao().fetch(WelfareProject.class, projectId);
|
||||||
|
// 获取当前时间
|
||||||
|
Date now = new Date();
|
||||||
|
// 判断时间段是否已结束
|
||||||
|
if (now.after(project.getProvideTimeEnd())) {
|
||||||
|
return Result.error("您选择的时间段已结束!");
|
||||||
|
}
|
||||||
|
|
||||||
|
// 判断时间段是否尚未开始
|
||||||
|
if (now.before(project.getProvideTimeStart())) {
|
||||||
|
return Result.error("您选择的时间段尚未开始!");
|
||||||
|
}
|
||||||
String userId = ShiroUtil.getUserId();
|
String userId = ShiroUtil.getUserId();
|
||||||
|
|
||||||
int count = simpleService.dao().count(WelfareList.class, Cnd.where("projectId", "=", projectId).and("userId", "=", userId));
|
WelfareList welfareList = simpleService.dao().fetch(WelfareList.class, Cnd.where("projectId", "=", projectId).and("userId", "=", ShiroUtil.getUserId()));
|
||||||
if (count <= 0) {
|
if (Lang.isEmpty(welfareList)) {
|
||||||
return Result.error("您不在此次选择名单中,如有疑问请及时联系校工会");
|
return Result.error("您暂无权限!");
|
||||||
|
}
|
||||||
|
|
||||||
|
//如果是积分模式
|
||||||
|
if (project.getIsIntegralMode()) {
|
||||||
|
BigDecimal totalIntegralBig = new BigDecimal(totalIntegral);
|
||||||
|
totalIntegralBig = totalIntegralBig.divide(BigDecimal.valueOf(100));
|
||||||
|
if (totalIntegralBig.compareTo(BigDecimal.ZERO) == 0) {
|
||||||
|
return Result.error("请选择后在提交!");
|
||||||
|
}
|
||||||
|
if (project.getAllIntegral().compareTo(totalIntegralBig) < 0) {
|
||||||
|
return Result.error("您的积分不足!");
|
||||||
|
}
|
||||||
|
if (totalIntegralBig.compareTo(project.getAllIntegral()) < 0) {
|
||||||
|
BigDecimal remainingIntegral = project.getAllIntegral().subtract(totalIntegralBig);
|
||||||
|
return Result.error("您积分还剩余" + remainingIntegral + ",请选择后再提提交!");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//删除上次选择的
|
//删除上次选择的
|
||||||
@@ -178,7 +209,7 @@ public class WelfareUserChooseController {
|
|||||||
for (WelfareUserSelection welfareUserSelection : welfareUserSelections) {
|
for (WelfareUserSelection welfareUserSelection : welfareUserSelections) {
|
||||||
welfareUserSelection.setSelectUserId(userId);
|
welfareUserSelection.setSelectUserId(userId);
|
||||||
welfareUserSelection.setSelectTime(new Date());
|
welfareUserSelection.setSelectTime(new Date());
|
||||||
if (welfareUserSelection.getSelectNum() > 1) {
|
if (welfareUserSelection.getSelectNum() > 1 && !project.getIsIntegralMode()) {
|
||||||
return Result.error("福利选择限制超过最大限制");
|
return Result.error("福利选择限制超过最大限制");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ import org.nutz.dao.entity.annotation.*;
|
|||||||
import org.nutz.dao.interceptor.annotation.PrevInsert;
|
import org.nutz.dao.interceptor.annotation.PrevInsert;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
import java.math.BigDecimal;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@@ -219,6 +220,17 @@ public class WelfareProject extends BaseModel implements Serializable, SysHomeCo
|
|||||||
@ColDefine(type = ColType.BOOLEAN)
|
@ColDefine(type = ColType.BOOLEAN)
|
||||||
private Boolean isYearBirthday;
|
private Boolean isYearBirthday;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@Comment("是否积分模式")
|
||||||
|
@ColDefine(type = ColType.BOOLEAN)
|
||||||
|
private Boolean isIntegralMode;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@Comment("总积分")
|
||||||
|
@Default("0")
|
||||||
|
@ColDefine(customType = "decimal(10,2)")
|
||||||
|
private BigDecimal allIntegral;
|
||||||
|
|
||||||
@Column
|
@Column
|
||||||
@Comment("是否禁用")
|
@Comment("是否禁用")
|
||||||
@Default("0")
|
@Default("0")
|
||||||
|
|||||||
@@ -89,4 +89,10 @@ public class WelfareProjectSubjectOption extends BaseModel {
|
|||||||
@Comment("简短备注")
|
@Comment("简短备注")
|
||||||
@ColDefine(type = ColType.VARCHAR,width = 100)
|
@ColDefine(type = ColType.VARCHAR,width = 100)
|
||||||
private String simpleDesc;
|
private String simpleDesc;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@Comment("套餐积分")
|
||||||
|
@Default("0")
|
||||||
|
@ColDefine(type = ColType.INT)
|
||||||
|
private Integer integral;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -104,6 +104,14 @@
|
|||||||
<el-input v-model="row.supplier" type="textarea" max="100"></el-input>
|
<el-input v-model="row.supplier" type="textarea" max="100"></el-input>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
align="center"
|
||||||
|
header-align="center"
|
||||||
|
v-if="is_integral_mode" label="所需积分" width="150">
|
||||||
|
<template slot-scope="{row}">
|
||||||
|
<el-input-number v-model="row.integral" style="width: 100%"></el-input-number>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
|
||||||
<!-- <el-table-column label="备注2">
|
<!-- <el-table-column label="备注2">
|
||||||
<template slot-scope="{row}">
|
<template slot-scope="{row}">
|
||||||
@@ -129,7 +137,7 @@
|
|||||||
:width="100"
|
:width="100"
|
||||||
:limit="1"
|
:limit="1"
|
||||||
:file-type="['png','jpg']"
|
:file-type="['png','jpg']"
|
||||||
:file-size="0.2"
|
:file-size="5"
|
||||||
:size="[500,200]"
|
:size="[500,200]"
|
||||||
v-model="row.imgUrl"></image-upload>
|
v-model="row.imgUrl"></image-upload>
|
||||||
</template>
|
</template>
|
||||||
@@ -175,7 +183,14 @@
|
|||||||
|
|
||||||
<div class="s-operation">
|
<div class="s-operation">
|
||||||
<el-button size="small" type="primary"
|
<el-button size="small" type="primary"
|
||||||
@click="s.options.push({optionType:'套餐',optionNameId:'',optionName:'福利'+(s.options.length+1),optionSort:s.options.length+1,imgUrl:null,isDefaultOption:false,isSystemDefault:false})">
|
@click="s.options.push({optionType:'套餐',
|
||||||
|
optionNameId:'',
|
||||||
|
optionName:'福利'+(s.options.length+1),
|
||||||
|
optionSort:s.options.length+1,
|
||||||
|
imgUrl:null,
|
||||||
|
integral:0,
|
||||||
|
isDefaultOption:false,
|
||||||
|
isSystemDefault:false})">
|
||||||
添加福利
|
添加福利
|
||||||
</el-button>
|
</el-button>
|
||||||
</div>
|
</div>
|
||||||
@@ -217,6 +232,10 @@ module.exports = {
|
|||||||
subject: {
|
subject: {
|
||||||
type: Array,
|
type: Array,
|
||||||
default: []
|
default: []
|
||||||
|
},
|
||||||
|
is_integral_mode: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
|
|||||||
@@ -152,7 +152,8 @@ layout("/mobile/platform.html"){
|
|||||||
|
|
||||||
<template v-show="vLoading && !vLoading.value">
|
<template v-show="vLoading && !vLoading.value">
|
||||||
<div>
|
<div>
|
||||||
<van-image :src="CREATE_PREVIEW_URL(projectInfo.cover)" fit="cover" style="width: 100%; height: 150px"></van-image>
|
<van-image :src="CREATE_PREVIEW_URL(projectInfo.cover)" fit="cover"
|
||||||
|
style="width: 100%; height: 150px"></van-image>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!--基本信息-->
|
<!--基本信息-->
|
||||||
@@ -171,10 +172,12 @@ layout("/mobile/platform.html"){
|
|||||||
<template v-if="clickUpOrDown">
|
<template v-if="clickUpOrDown">
|
||||||
<van-cell :border="false" :value="projectInfo.name" title="福利名称"></van-cell>
|
<van-cell :border="false" :value="projectInfo.name" title="福利名称"></van-cell>
|
||||||
<van-cell :border="false" :value="projectInfo.festival" title="发放节日"></van-cell>
|
<van-cell :border="false" :value="projectInfo.festival" title="发放节日"></van-cell>
|
||||||
<van-cell :border="false" :value="projectInfo.gift" title="福利礼品" v-if="!projectInfo.flexible"></van-cell>
|
<van-cell :border="false" :value="projectInfo.gift" title="福利礼品"
|
||||||
|
v-if="!projectInfo.flexible"></van-cell>
|
||||||
<!--<van-cell :border="false" :value="projectInfo.provideAddress"
|
<!--<van-cell :border="false" :value="projectInfo.provideAddress"
|
||||||
title="发放地点"></van-cell>-->
|
title="发放地点"></van-cell>-->
|
||||||
<van-cell :border="false" title="选择形式">{{projectInfo.isCheckBox==='checkBox'?'多选':'单选'}}</van-cell>
|
<van-cell :border="false" title="选择形式">{{projectInfo.isCheckBox==='checkBox'?'多选':'单选'}}
|
||||||
|
</van-cell>
|
||||||
<van-cell
|
<van-cell
|
||||||
:border="false"
|
:border="false"
|
||||||
:value="projectInfo.multiSelectNum"
|
:value="projectInfo.multiSelectNum"
|
||||||
@@ -189,12 +192,18 @@ layout("/mobile/platform.html"){
|
|||||||
</van-cell>
|
</van-cell>
|
||||||
<van-cell :border="false" title="签收形式">
|
<van-cell :border="false" title="签收形式">
|
||||||
<template>
|
<template>
|
||||||
{{welfareSignMode.find(v=>v.code==projectInfo.signMode) && welfareSignMode.find(v=>v.code==projectInfo.signMode).description}}
|
{{welfareSignMode.find(v=>v.code==projectInfo.signMode) &&
|
||||||
|
welfareSignMode.find(v=>v.code==projectInfo.signMode).description}}
|
||||||
</template>
|
</template>
|
||||||
</van-cell>
|
</van-cell>
|
||||||
<van-cell :border="false" title="选择时间">
|
<van-cell :border="false" title="选择时间">
|
||||||
<template #label>{{projectInfo.choiceTimeStart + ' 至 ' + projectInfo.choiceTimeEnd}}</template>
|
<template #label>{{projectInfo.choiceTimeStart + ' 至 ' + projectInfo.choiceTimeEnd}}</template>
|
||||||
</van-cell>
|
</van-cell>
|
||||||
|
<van-cell :border="false" title="当前可使用积分" v-if="projectInfo.isIntegralMode">
|
||||||
|
<template>
|
||||||
|
{{projectInfo.allIntegral}}
|
||||||
|
</template>
|
||||||
|
</van-cell>
|
||||||
</template>
|
</template>
|
||||||
</van-cell-group>
|
</van-cell-group>
|
||||||
|
|
||||||
@@ -210,13 +219,14 @@ layout("/mobile/platform.html"){
|
|||||||
<div style="font-weight: bold; font-size: 15px; display: flex; align-items: center">选择套餐</div>
|
<div style="font-weight: bold; font-size: 15px; display: flex; align-items: center">选择套餐</div>
|
||||||
</van-cell>
|
</van-cell>
|
||||||
|
|
||||||
<div class="selection" style="background: #fff" v-for="(subject,sidx) in projectInfo.welfareProjectSubjects">
|
<div class="selection" style="background: #fff"
|
||||||
|
v-for="(subject,sidx) in projectInfo.welfareProjectSubjects">
|
||||||
<div style="display: flex; width: 100%; padding: 10px 0" v-for="(option, oidx) in subject.options">
|
<div style="display: flex; width: 100%; padding: 10px 0" v-for="(option, oidx) in subject.options">
|
||||||
<div style="width: 120px; height: 100px; display: flex; justify-content: center; align-items: center">
|
<div style="width: 120px; height: 130px; display: flex; justify-content: center; align-items: center">
|
||||||
<van-image
|
<van-image
|
||||||
:src="FILE_STREAM_PREVIEW_ADDRESS+'?id='+option.imgUrl"
|
:src="FILE_STREAM_PREVIEW_ADDRESS+'?id='+option.imgUrl"
|
||||||
fit="contain"
|
fit="contain"
|
||||||
style="width: 100px; height: 100px; border-radius: 10px"
|
style="width: 100px; height: 130px; border-radius: 10px"
|
||||||
></van-image>
|
></van-image>
|
||||||
<!-- @click="vant.ImagePreview([CREATE_PREVIEW_URL(option.imgUrl)])"-->
|
<!-- @click="vant.ImagePreview([CREATE_PREVIEW_URL(option.imgUrl)])"-->
|
||||||
</div>
|
</div>
|
||||||
@@ -230,7 +240,8 @@ layout("/mobile/platform.html"){
|
|||||||
</div>
|
</div>
|
||||||
<div class="optionDesc" v-if="option.simpleDesc">备注:{{option.simpleDesc}}</div>
|
<div class="optionDesc" v-if="option.simpleDesc">备注:{{option.simpleDesc}}</div>
|
||||||
<div style="position: absolute; right: 10px; bottom: 0; left: 0; display: flex; justify-content: space-between">
|
<div style="position: absolute; right: 10px; bottom: 0; left: 0; display: flex; justify-content: space-between">
|
||||||
<div @click="openViewDesc(option.description)" style="width: 70px; font-size: 13px; color: #918a8a; text-align: right">
|
<div @click="openViewDesc(option.description)"
|
||||||
|
style="width: 70px; font-size: 13px; color: #918a8a; text-align: right">
|
||||||
套餐详情
|
套餐详情
|
||||||
</div>
|
</div>
|
||||||
<van-stepper
|
<van-stepper
|
||||||
@@ -246,6 +257,12 @@ layout("/mobile/platform.html"){
|
|||||||
v-model="option.selectNum"
|
v-model="option.selectNum"
|
||||||
></van-stepper>
|
></van-stepper>
|
||||||
</div>
|
</div>
|
||||||
|
<div v-if="projectInfo.isIntegralMode"
|
||||||
|
style="position: absolute; right: 20px; bottom: 0;top:105px;display: flex; justify-content: space-between">
|
||||||
|
<div style="font-size: 14px; line-height: 14px;">
|
||||||
|
积分:<span style="color:red; margin-left: 4px; font-size: 14px; line-height: 14px;">{{option.integral}}</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -254,10 +271,11 @@ layout("/mobile/platform.html"){
|
|||||||
<van-submit-bar
|
<van-submit-bar
|
||||||
:button-text="confirmButtonInfo.text"
|
:button-text="confirmButtonInfo.text"
|
||||||
@submit="confirmSelect"
|
@submit="confirmSelect"
|
||||||
|
:price="totalIntegral"
|
||||||
tip="您可以在福利选择截至时间之前修改福利套餐"
|
tip="您可以在福利选择截至时间之前修改福利套餐"
|
||||||
tip-icon="info-o"
|
tip-icon="info-o"
|
||||||
>
|
>
|
||||||
<div style="width: calc(100% - 110px)">
|
<div style="width: calc(100% - 400px)">
|
||||||
<div style="width: 25px; height: 25px; position: relative">
|
<div style="width: 25px; height: 25px; position: relative">
|
||||||
<van-icon name="shopping-cart-o" size="25"></van-icon>
|
<van-icon name="shopping-cart-o" size="25"></van-icon>
|
||||||
<div class="van-info">{{sumSelectNum}}</div>
|
<div class="van-info">{{sumSelectNum}}</div>
|
||||||
@@ -266,11 +284,13 @@ layout("/mobile/platform.html"){
|
|||||||
</van-submit-bar>
|
</van-submit-bar>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<van-popup :style="{ height: '70%' }" closeable position="bottom" safe-area-inset-bottom v-model="selectAddressPopup">
|
<van-popup :style="{ height: '70%' }" closeable position="bottom" safe-area-inset-bottom
|
||||||
|
v-model="selectAddressPopup">
|
||||||
<div style="height: 100%">
|
<div style="height: 100%">
|
||||||
<div style="font-size: 15px; font-weight: bold; text-align: center; padding-top: 16px">配送至</div>
|
<div style="font-size: 15px; font-weight: bold; text-align: center; padding-top: 16px">配送至</div>
|
||||||
<template v-if="addressList && addressList.length>0">
|
<template v-if="addressList && addressList.length>0">
|
||||||
<van-cell @click="addressClick(item);selectAddressPopup=false" clickable icon="location-o" v-for="item in addressList">
|
<van-cell @click="addressClick(item);selectAddressPopup=false" clickable icon="location-o"
|
||||||
|
v-for="item in addressList">
|
||||||
<template #title>{{item.address}}</template>
|
<template #title>{{item.address}}</template>
|
||||||
<template #label>
|
<template #label>
|
||||||
<div>{{"地区:" + item.province + item.city + item.county}}</div>
|
<div>{{"地区:" + item.province + item.city + item.county}}</div>
|
||||||
@@ -283,7 +303,9 @@ layout("/mobile/platform.html"){
|
|||||||
<van-empty description="暂无地址" v-else></van-empty>
|
<van-empty description="暂无地址" v-else></van-empty>
|
||||||
|
|
||||||
<div style="position: absolute; bottom: 0; left: 0; box-sizing: border-box; width: 100%; padding: 0 16px; background: #fff">
|
<div style="position: absolute; bottom: 0; left: 0; box-sizing: border-box; width: 100%; padding: 0 16px; background: #fff">
|
||||||
<van-button @click="openAddressManage" block round style="height: 40px; margin: 5px 0" type="danger">地址管理</van-button>
|
<van-button @click="openAddressManage" block round style="height: 40px; margin: 5px 0" type="danger">
|
||||||
|
地址管理
|
||||||
|
</van-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</van-popup>
|
</van-popup>
|
||||||
@@ -323,7 +345,8 @@ layout("/mobile/platform.html"){
|
|||||||
></van-card>
|
></van-card>
|
||||||
<div class="van-hairline--top"></div>
|
<div class="van-hairline--top"></div>
|
||||||
<van-cell>
|
<van-cell>
|
||||||
<van-field label="联系方式" v-model="mobile" required placeholder="请输入联系方式" type="tel" maxlength="11"></van-field>
|
<van-field label="联系方式" v-model="mobile" required placeholder="请输入联系方式" type="tel"
|
||||||
|
maxlength="11"></van-field>
|
||||||
</van-cell>
|
</van-cell>
|
||||||
<van-cell @click="openShoppingPopup(item,index)" is-link title="取货门店" v-if="item.shoppingId">
|
<van-cell @click="openShoppingPopup(item,index)" is-link title="取货门店" v-if="item.shoppingId">
|
||||||
<template #label>{{item.receiveAddress?item.receiveAddress:'暂未选择'}}</template>
|
<template #label>{{item.receiveAddress?item.receiveAddress:'暂未选择'}}</template>
|
||||||
@@ -354,7 +377,8 @@ layout("/mobile/platform.html"){
|
|||||||
</van-cell>
|
</van-cell>
|
||||||
<van-cell title="">
|
<van-cell title="">
|
||||||
<template #label>
|
<template #label>
|
||||||
<mobile-sign :is_value_base64="false" prefix="welfare" ref="signature" v-model="signData"></mobile-sign>
|
<mobile-sign :is_value_base64="false" prefix="welfare" ref="signature"
|
||||||
|
v-model="signData"></mobile-sign>
|
||||||
</template>
|
</template>
|
||||||
</van-cell>
|
</van-cell>
|
||||||
</div>
|
</div>
|
||||||
@@ -375,13 +399,15 @@ layout("/mobile/platform.html"){
|
|||||||
>
|
>
|
||||||
<div>
|
<div>
|
||||||
<div style="margin-top: 45px">
|
<div style="margin-top: 45px">
|
||||||
<van-search @search="onSearchShoppingAddress" placeholder="请输入门店关键词" show-action v-model="shoppingAddress">
|
<van-search @search="onSearchShoppingAddress" placeholder="请输入门店关键词" show-action
|
||||||
|
v-model="shoppingAddress">
|
||||||
<template #action>
|
<template #action>
|
||||||
<div @click="onSearchShoppingAddress">搜索</div>
|
<div @click="onSearchShoppingAddress">搜索</div>
|
||||||
</template>
|
</template>
|
||||||
</van-search>
|
</van-search>
|
||||||
<div class="van-cell-group--inset" v-if="offlineStoresOption && offlineStoresOption.length>0">
|
<div class="van-cell-group--inset" v-if="offlineStoresOption && offlineStoresOption.length>0">
|
||||||
<van-cell icon="location-o" class="custom-cell" @click="addShopping(item.address)" v-for="item in offlineStoresOption">
|
<van-cell icon="location-o" class="custom-cell" @click="addShopping(item.address)"
|
||||||
|
v-for="item in offlineStoresOption">
|
||||||
{{item.address}}
|
{{item.address}}
|
||||||
</van-cell>
|
</van-cell>
|
||||||
</div>
|
</div>
|
||||||
@@ -424,7 +450,8 @@ layout("/mobile/platform.html"){
|
|||||||
optionData: {},
|
optionData: {},
|
||||||
|
|
||||||
clickUpOrDown: false,
|
clickUpOrDown: false,
|
||||||
mobile: ""
|
mobile: "",
|
||||||
|
totalIntegral: 0
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@@ -450,36 +477,36 @@ layout("/mobile/platform.html"){
|
|||||||
},
|
},
|
||||||
confirmButtonInfo() {
|
confirmButtonInfo() {
|
||||||
if (this.projectInfo) {
|
if (this.projectInfo) {
|
||||||
const { choiceTimeEnd, choiceTimeStart, overdueChoiceTimeEnd } = this.projectInfo
|
const {choiceTimeEnd, choiceTimeStart, overdueChoiceTimeEnd} = this.projectInfo
|
||||||
const now = moment().valueOf()
|
const now = moment().valueOf()
|
||||||
|
|
||||||
if (overdueChoiceTimeEnd == null || overdueChoiceTimeEnd === "") {
|
if (overdueChoiceTimeEnd == null || overdueChoiceTimeEnd === "") {
|
||||||
if (now > moment(choiceTimeStart).valueOf() && now < moment(choiceTimeEnd).valueOf()) {
|
if (now > moment(choiceTimeStart).valueOf() && now < moment(choiceTimeEnd).valueOf()) {
|
||||||
return { text: this.isSelect ? "选好了,下一步" : "选好了,下一步", disabled: false }
|
return {text: this.isSelect ? "选好了,下一步" : "选好了,下一步", disabled: false}
|
||||||
} else if (now > moment(choiceTimeEnd).valueOf()) {
|
} else if (now > moment(choiceTimeEnd).valueOf()) {
|
||||||
return { text: "选择已结束", disabled: true }
|
return {text: "选择已结束", disabled: true}
|
||||||
} else if (now < moment(choiceTimeStart).valueOf()) {
|
} else if (now < moment(choiceTimeStart).valueOf()) {
|
||||||
return { text: "选择未开始", disabled: true }
|
return {text: "选择未开始", disabled: true}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
//已选择了不能再动了
|
//已选择了不能再动了
|
||||||
if (this.isSelect) {
|
if (this.isSelect) {
|
||||||
if (moment(this.selectTime).valueOf() > moment(choiceTimeEnd).valueOf() && now < moment(overdueChoiceTimeEnd).valueOf()) {
|
if (moment(this.selectTime).valueOf() > moment(choiceTimeEnd).valueOf() && now < moment(overdueChoiceTimeEnd).valueOf()) {
|
||||||
return { text: "下一步", disabled: false }
|
return {text: "下一步", disabled: false}
|
||||||
}
|
}
|
||||||
return { text: "选择已结束", disabled: true }
|
return {text: "选择已结束", disabled: true}
|
||||||
} else {
|
} else {
|
||||||
if (now > moment(choiceTimeStart).valueOf() && now < moment(overdueChoiceTimeEnd).valueOf()) {
|
if (now > moment(choiceTimeStart).valueOf() && now < moment(overdueChoiceTimeEnd).valueOf()) {
|
||||||
return { text: this.isSelect ? "选好了,下一步" : "选好了,下一步", disabled: false }
|
return {text: this.isSelect ? "选好了,下一步" : "选好了,下一步", disabled: false}
|
||||||
} else if (now > moment(overdueChoiceTimeEnd).valueOf()) {
|
} else if (now > moment(overdueChoiceTimeEnd).valueOf()) {
|
||||||
return { text: "选择已结束", disabled: true }
|
return {text: "选择已结束", disabled: true}
|
||||||
} else if (now < moment(choiceTimeStart).valueOf()) {
|
} else if (now < moment(choiceTimeStart).valueOf()) {
|
||||||
return { text: "选择未开始", disabled: true }
|
return {text: "选择未开始", disabled: true}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return { text: "", disabled: true }
|
return {text: "", disabled: true}
|
||||||
},
|
},
|
||||||
selectedOptions() {
|
selectedOptions() {
|
||||||
if (this.projectInfo && this.projectInfo.welfareProjectSubjects) {
|
if (this.projectInfo && this.projectInfo.welfareProjectSubjects) {
|
||||||
@@ -536,7 +563,7 @@ layout("/mobile/platform.html"){
|
|||||||
overlay: true,
|
overlay: true,
|
||||||
duration: 0
|
duration: 0
|
||||||
})
|
})
|
||||||
const resp = await $.post("/mobile/welfare/mine/deleteAddress", { id: item.id })
|
const resp = await $.post("/mobile/welfare/mine/deleteAddress", {id: item.id})
|
||||||
loading.close()
|
loading.close()
|
||||||
if (resp.code === 0) {
|
if (resp.code === 0) {
|
||||||
this.$toast.success(resp.msg)
|
this.$toast.success(resp.msg)
|
||||||
@@ -556,7 +583,19 @@ layout("/mobile/platform.html"){
|
|||||||
},
|
},
|
||||||
//数量更改
|
//数量更改
|
||||||
numChange(value, option, optionIndex) {
|
numChange(value, option, optionIndex) {
|
||||||
const { isCheckBox, multiSelectNum, singleOptionSupportMultipleSelection } = this.projectInfo
|
const {
|
||||||
|
isIntegralMode,
|
||||||
|
isCheckBox,
|
||||||
|
multiSelectNum,
|
||||||
|
singleOptionSupportMultipleSelection
|
||||||
|
} = this.projectInfo
|
||||||
|
if (isIntegralMode) {
|
||||||
|
let totalIntegral = 0
|
||||||
|
this.projectInfo.welfareProjectSubjects[0].options.forEach(v => {
|
||||||
|
totalIntegral = totalIntegral + (v.integral * v.selectNum)
|
||||||
|
})
|
||||||
|
this.totalIntegral = totalIntegral * 100
|
||||||
|
} else {
|
||||||
if (isCheckBox === "checkBox") {
|
if (isCheckBox === "checkBox") {
|
||||||
//判断是否支持单个多选
|
//判断是否支持单个多选
|
||||||
if (!singleOptionSupportMultipleSelection && value > 1) {
|
if (!singleOptionSupportMultipleSelection && value > 1) {
|
||||||
@@ -573,6 +612,8 @@ layout("/mobile/platform.html"){
|
|||||||
this.$set(this.projectInfo.welfareProjectSubjects[0].options[optionIndex], "selectNum", value - 1)
|
this.$set(this.projectInfo.welfareProjectSubjects[0].options[optionIndex], "selectNum", value - 1)
|
||||||
this.$toast("此次福利最多只能选择" + multiSelectNum + "份")
|
this.$toast("此次福利最多只能选择" + multiSelectNum + "份")
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
//确定选择
|
//确定选择
|
||||||
@@ -582,7 +623,18 @@ layout("/mobile/platform.html"){
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
const { isCheckBox, multiSelectNum, singleOptionSupportMultipleSelection } = this.projectInfo
|
const {id, isCheckBox, multiSelectNum, isIntegralMode} = this.projectInfo
|
||||||
|
//积分模式
|
||||||
|
if (isIntegralMode) {
|
||||||
|
const resp = await $.post("/mobile/welfare/list/validateUserIntegral", {
|
||||||
|
projectId: id,
|
||||||
|
totalIntegral: this.totalIntegral
|
||||||
|
})
|
||||||
|
if (resp.code !== 0) {
|
||||||
|
this.$toast.fail(resp.msg)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
} else {
|
||||||
if (isCheckBox === "checkBox") {
|
if (isCheckBox === "checkBox") {
|
||||||
if (this.sumSelectNum < multiSelectNum) {
|
if (this.sumSelectNum < multiSelectNum) {
|
||||||
//用户没有选择完
|
//用户没有选择完
|
||||||
@@ -590,6 +642,7 @@ layout("/mobile/platform.html"){
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
this.confirmPopup = true
|
this.confirmPopup = true
|
||||||
|
|
||||||
//回显用户的地址
|
//回显用户的地址
|
||||||
@@ -643,7 +696,7 @@ layout("/mobile/platform.html"){
|
|||||||
this.$modal.msg("请选择取货门店:" + notReceiveAddress.join(","))
|
this.$modal.msg("请选择取货门店:" + notReceiveAddress.join(","))
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
const { code, msg, data } = await $.post("/platform/welfare/userChoose/confirmSelect", {
|
const {code, msg, data} = await $.post("/platform/welfare/userChoose/confirmSelect", {
|
||||||
welfareUserSelections: JSON.stringify(formData),
|
welfareUserSelections: JSON.stringify(formData),
|
||||||
projectId: this.projectId,
|
projectId: this.projectId,
|
||||||
mobile: this.mobile
|
mobile: this.mobile
|
||||||
@@ -696,12 +749,12 @@ layout("/mobile/platform.html"){
|
|||||||
|
|
||||||
//地址列表点击
|
//地址列表点击
|
||||||
addressClick(item) {
|
addressClick(item) {
|
||||||
const { province, city, county, address, name, tel } = item
|
const {province, city, county, address, name, tel} = item
|
||||||
this.selectAddress = "收货地址:" + province + city + county + address + "," + "收件人:" + name + "," + "联系方式:" + tel
|
this.selectAddress = "收货地址:" + province + city + county + address + "," + "收件人:" + name + "," + "联系方式:" + tel
|
||||||
},
|
},
|
||||||
|
|
||||||
async getProjectInfo() {
|
async getProjectInfo() {
|
||||||
const resp = await $.get("/platform/welfare/common/findOne", { projectId: this.projectId })
|
const resp = await $.get("/platform/welfare/common/findOne", {projectId: this.projectId})
|
||||||
if (resp.code === 0) {
|
if (resp.code === 0) {
|
||||||
resp.data.multiSelectNum = resp.data.multiSelectNum ? resp.data.multiSelectNum : 1
|
resp.data.multiSelectNum = resp.data.multiSelectNum ? resp.data.multiSelectNum : 1
|
||||||
this.projectInfo = resp.data
|
this.projectInfo = resp.data
|
||||||
@@ -711,7 +764,7 @@ layout("/mobile/platform.html"){
|
|||||||
|
|
||||||
//获取用户选择的数据
|
//获取用户选择的数据
|
||||||
async getUserSelection(projectId) {
|
async getUserSelection(projectId) {
|
||||||
const resp = await $.get("/platform/welfare/mine/getUserSelection", { projectId: projectId })
|
const resp = await $.get("/platform/welfare/mine/getUserSelection", {projectId: projectId})
|
||||||
this.userSelection = resp.data
|
this.userSelection = resp.data
|
||||||
this.echoUserSelection()
|
this.echoUserSelection()
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -24,8 +24,10 @@ layout("/layouts/platform.html"){
|
|||||||
<div class="search-item" v-if="${@shiro.hasRole('sysadmin')||@shiro.hasRole('SchoolUnionAdmin')}">
|
<div class="search-item" v-if="${@shiro.hasRole('sysadmin')||@shiro.hasRole('SchoolUnionAdmin')}">
|
||||||
<div class="search-item-label">所属福利:</div>
|
<div class="search-item-label">所属福利:</div>
|
||||||
<div class="search-item-option">
|
<div class="search-item-option">
|
||||||
<el-select @change="projectChange" clearable style="width: 100%" v-model="pageForm.welfareId">
|
<el-select @change="projectChange" clearable style="width: 100%"
|
||||||
<el-option :key="item.id" :label="item.name" :value="item.id" v-for="item in projectOptions"></el-option>
|
v-model="pageForm.welfareId">
|
||||||
|
<el-option :key="item.id" :label="item.name" :value="item.id"
|
||||||
|
v-for="item in projectOptions"></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -115,20 +117,21 @@ layout("/layouts/platform.html"){
|
|||||||
></el-switch>
|
></el-switch>
|
||||||
</template>
|
</template>
|
||||||
<template v-else>
|
<template v-else>
|
||||||
<el-switch active-color="#13ce66" disabled inactive-color="#ff4949" v-model="row.isEnable"></el-switch>
|
<el-switch active-color="#13ce66" disabled inactive-color="#ff4949"
|
||||||
|
v-model="row.isEnable"></el-switch>
|
||||||
</template>
|
</template>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
||||||
<el-table-column align="center" header-align="center" label="操作" prop="userOnline" width="100px">
|
<el-table-column align="center" header-align="center" label="操作" prop="userOnline" width="300px">
|
||||||
<template scope="{row}">
|
<template scope="{row}">
|
||||||
<!-- <el-button size="mini" type="primary" plain @click="openPackage(row)">
|
<el-button size="mini" type="primary" @click="openPackage(row)">
|
||||||
录入套餐
|
录入套餐
|
||||||
</el-button>
|
</el-button>
|
||||||
|
|
||||||
<el-button size="mini" type="primary" plain @click="openView(row)">
|
<el-button size="mini" type="primary" @click="openView(row)">
|
||||||
查看领取情况
|
查看领取情况
|
||||||
</el-button>-->
|
</el-button>
|
||||||
|
|
||||||
<el-button @click="openEdit(row)" size="mini" type="primary">编辑</el-button>
|
<el-button @click="openEdit(row)" size="mini" type="primary">编辑</el-button>
|
||||||
<!-- <template v-if="${@shiro.hasRole('sysadmin')||@shiro.hasRole('SchoolUnionAdmin')}">
|
<!-- <template v-if="${@shiro.hasRole('sysadmin')||@shiro.hasRole('SchoolUnionAdmin')}">
|
||||||
@@ -157,9 +160,12 @@ layout("/layouts/platform.html"){
|
|||||||
placeholder="请选择工会查询"
|
placeholder="请选择工会查询"
|
||||||
v-model="choosePageForm.unionId"
|
v-model="choosePageForm.unionId"
|
||||||
>
|
>
|
||||||
<el-option :key="item.id" :label="item.unionname" :value="item.id" v-for="item in unionOptions"></el-option>
|
<el-option :key="item.id" :label="item.unionname" :value="item.id"
|
||||||
|
v-for="item in unionOptions"></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
<el-button @click="doChooseExport" class="ml10" icon="el-icon-download" plain type="primary">导出明细</el-button>
|
<el-button @click="doChooseExport" class="ml10" icon="el-icon-download" plain type="primary">
|
||||||
|
导出明细
|
||||||
|
</el-button>
|
||||||
</template>
|
</template>
|
||||||
</vi-title2>
|
</vi-title2>
|
||||||
|
|
||||||
@@ -171,11 +177,16 @@ layout("/layouts/platform.html"){
|
|||||||
style="width: 100%; margin-bottom: 20px"
|
style="width: 100%; margin-bottom: 20px"
|
||||||
v-loading="tableLoading"
|
v-loading="tableLoading"
|
||||||
>
|
>
|
||||||
<el-table-column :index="indexMethod" align="center" header-align="center" label="序号" type="index" width="80px"></el-table-column>
|
<el-table-column :index="indexMethod" align="center" header-align="center" label="序号" type="index"
|
||||||
<el-table-column align="center" header-align="center" label="工号" prop="loginname" width="200px"></el-table-column>
|
width="80px"></el-table-column>
|
||||||
<el-table-column align="center" header-align="center" label="姓名" prop="username" width="200px"></el-table-column>
|
<el-table-column align="center" header-align="center" label="工号" prop="loginname"
|
||||||
<el-table-column align="center" header-align="center" label="所属基层工会" prop="unionname" width="200px"></el-table-column>
|
width="200px"></el-table-column>
|
||||||
<el-table-column align="center" header-align="center" label="所选福利" prop="gist_list" width="200px"></el-table-column>
|
<el-table-column align="center" header-align="center" label="姓名" prop="username"
|
||||||
|
width="200px"></el-table-column>
|
||||||
|
<el-table-column align="center" header-align="center" label="所属基层工会" prop="unionname"
|
||||||
|
width="200px"></el-table-column>
|
||||||
|
<el-table-column align="center" header-align="center" label="所选福利" prop="gist_list"
|
||||||
|
width="200px"></el-table-column>
|
||||||
|
|
||||||
<el-table-column align="center" header-align="center" label="配送地址" prop="receiveAddress">
|
<el-table-column align="center" header-align="center" label="配送地址" prop="receiveAddress">
|
||||||
<template scope="{row}">
|
<template scope="{row}">
|
||||||
@@ -263,7 +274,8 @@ layout("/layouts/platform.html"){
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template #edit>
|
<template #edit>
|
||||||
<el-form :model="formData" :rules="rules" label-position="right" label-suffix=":" label-width="130px" ref="addForm">
|
<el-form :model="formData" :rules="rules" label-position="right" label-suffix=":" label-width="130px"
|
||||||
|
ref="addForm">
|
||||||
<el-row :gutter="60">
|
<el-row :gutter="60">
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="年度" prop="year">
|
<el-form-item label="年度" prop="year">
|
||||||
@@ -321,7 +333,8 @@ layout("/layouts/platform.html"){
|
|||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="所属福利" prop="welfareId">
|
<el-form-item label="所属福利" prop="welfareId">
|
||||||
<el-select clearable style="width: 100%" v-model="formData.welfareId">
|
<el-select clearable style="width: 100%" v-model="formData.welfareId">
|
||||||
<el-option :key="item.id" :label="item.name" :value="item.id" v-for="item in projectOptions"></el-option>
|
<el-option :key="item.id" :label="item.name" :value="item.id"
|
||||||
|
v-for="item in projectOptions"></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
@@ -340,18 +353,21 @@ layout("/layouts/platform.html"){
|
|||||||
|
|
||||||
<el-col :span="24">
|
<el-col :span="24">
|
||||||
<el-form-item label="线下门店" prop="offlineStores">
|
<el-form-item label="线下门店" prop="offlineStores">
|
||||||
<el-table :data="formData.offlineStores" border max-height="500" size="mini" style="width: 100%">
|
<el-table :data="formData.offlineStores" border max-height="500" size="mini"
|
||||||
|
style="width: 100%">
|
||||||
<el-table-column label="序号" sortable type="index" width="100"></el-table-column>
|
<el-table-column label="序号" sortable type="index" width="100"></el-table-column>
|
||||||
<el-table-column label="门店地址">
|
<el-table-column label="门店地址">
|
||||||
<template scope="{row,$index}">
|
<template scope="{row,$index}">
|
||||||
<el-form-item label-width="0">
|
<el-form-item label-width="0">
|
||||||
<el-input maxlength="50" placeholder="请输入门店地址" v-model="row.address"></el-input>
|
<el-input maxlength="50" placeholder="请输入门店地址"
|
||||||
|
v-model="row.address"></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column align="center" header-align="center" label="操作" width="150px">
|
<el-table-column align="center" header-align="center" label="操作" width="150px">
|
||||||
<template slot="header" slot-scope="scope">
|
<template slot="header" slot-scope="scope">
|
||||||
<el-button @click="formData.offlineStores.push({})" icon="el-icon-plus" size="mini" type="primary">
|
<el-button @click="formData.offlineStores.push({})" icon="el-icon-plus"
|
||||||
|
size="mini" type="primary">
|
||||||
添加
|
添加
|
||||||
</el-button>
|
</el-button>
|
||||||
</template>
|
</template>
|
||||||
@@ -381,7 +397,8 @@ layout("/layouts/platform.html"){
|
|||||||
|
|
||||||
<el-col :span="24">
|
<el-col :span="24">
|
||||||
<el-form-item label="二维码" prop="qrCode">
|
<el-form-item label="二维码" prop="qrCode">
|
||||||
<file-upload :files.sync="formData.qrCode" :max="1" :type="['jpg', 'jpeg', 'png','webp']" card>
|
<file-upload :files.sync="formData.qrCode" :max="1" :type="['jpg', 'jpeg', 'png','webp']"
|
||||||
|
card>
|
||||||
<template #el-upload__tip>
|
<template #el-upload__tip>
|
||||||
<span style="color: red">只能上传jpg,jpeg,png,webp格式的一张图片</span>
|
<span style="color: red">只能上传jpg,jpeg,png,webp格式的一张图片</span>
|
||||||
</template>
|
</template>
|
||||||
@@ -398,12 +415,14 @@ layout("/layouts/platform.html"){
|
|||||||
</guava>
|
</guava>
|
||||||
|
|
||||||
<el-drawer :before-close="handleClose" :visible.sync="packageDrawer" direction="rtl" size="60%" title="录入套餐">
|
<el-drawer :before-close="handleClose" :visible.sync="packageDrawer" direction="rtl" size="60%" title="录入套餐">
|
||||||
<el-form :model="formData" :rules="rules" label-position="right" label-suffix=":" label-width="170px" ref="addForm">
|
<el-form :model="formData" :rules="rules" label-position="right" label-suffix=":" label-width="170px"
|
||||||
|
ref="addForm">
|
||||||
<el-row :gutter="60">
|
<el-row :gutter="60">
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item class="is-required" label="选择需要录入的福利" prop="projectId">
|
<el-form-item class="is-required" label="选择需要录入的福利" prop="projectId">
|
||||||
<el-select @change="projectChange" clearable disabled style="width: 100%" v-model="projectId">
|
<el-select @change="projectChange" clearable disabled style="width: 100%" v-model="projectId">
|
||||||
<el-option :key="item.id" :label="item.name" :value="item.id" v-for="item in projectOptions"></el-option>
|
<el-option :key="item.id" :label="item.name" :value="item.id"
|
||||||
|
v-for="item in projectOptions"></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
@@ -426,7 +445,8 @@ layout("/layouts/platform.html"){
|
|||||||
padding-left: 10px;
|
padding-left: 10px;
|
||||||
"
|
"
|
||||||
>
|
>
|
||||||
<el-input autosize class="text-input" data-type="option" v-model="row.optionName"></el-input>
|
<el-input autosize class="text-input" data-type="option"
|
||||||
|
v-model="row.optionName"></el-input>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
@@ -442,10 +462,16 @@ layout("/layouts/platform.html"){
|
|||||||
padding-left: 10px;
|
padding-left: 10px;
|
||||||
"
|
"
|
||||||
>
|
>
|
||||||
<el-input autosize class="text-input" data-type="option" v-model="row.optionSort"></el-input>
|
<el-input autosize class="text-input" data-type="option"
|
||||||
|
v-model="row.optionSort"></el-input>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
<el-table-column label="备注1">
|
||||||
|
<template slot-scope="{row}">
|
||||||
|
<el-input v-model="row.supplier" type="textarea" max="100"></el-input>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
|
||||||
<el-table-column label="图片" property="imgUrl">
|
<el-table-column label="图片" property="imgUrl">
|
||||||
<template slot-scope="{row,$index}">
|
<template slot-scope="{row,$index}">
|
||||||
@@ -457,7 +483,8 @@ layout("/layouts/platform.html"){
|
|||||||
class="avatar-uploader"
|
class="avatar-uploader"
|
||||||
>
|
>
|
||||||
<div style="position: relative" v-if="row.imgUrl">
|
<div style="position: relative" v-if="row.imgUrl">
|
||||||
<img :src="FILE_STREAM_PREVIEW_ADDRESS+'?id='+row.imgUrl" class="avatar" />
|
<img :src="FILE_STREAM_PREVIEW_ADDRESS+'?id='+row.imgUrl"
|
||||||
|
class="avatar"/>
|
||||||
<div @click.stop="closePopover(row)">
|
<div @click.stop="closePopover(row)">
|
||||||
<i class="el-icon-delete avatar-delete"></i>
|
<i class="el-icon-delete avatar-delete"></i>
|
||||||
</div>
|
</div>
|
||||||
@@ -470,7 +497,8 @@ layout("/layouts/platform.html"){
|
|||||||
|
|
||||||
<el-table-column label="说明" property="description" width="120">
|
<el-table-column label="说明" property="description" width="120">
|
||||||
<template slot-scope="{row,$index}">
|
<template slot-scope="{row,$index}">
|
||||||
<el-link @click="openDescRichText(row.description,$index)" type="primary">编辑说明</el-link>
|
<el-link @click="openDescRichText(row.description,$index)" type="primary">编辑说明
|
||||||
|
</el-link>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
||||||
@@ -490,8 +518,11 @@ layout("/layouts/platform.html"){
|
|||||||
</el-table>
|
</el-table>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<el-button @click="doSubmitWelfare" style="float: right; margin-top: 10px; margin-right: 10px" type="success">提交</el-button>
|
<el-button @click="doSubmitWelfare" style="float: right; margin-top: 10px; margin-right: 10px"
|
||||||
<el-button @click="packageDrawer=false" plain style="float: right; margin-top: 10px; margin-right: 10px" type="primary">
|
type="success">提交
|
||||||
|
</el-button>
|
||||||
|
<el-button @click="packageDrawer=false" plain
|
||||||
|
style="float: right; margin-top: 10px; margin-right: 10px" type="primary">
|
||||||
取消
|
取消
|
||||||
</el-button>
|
</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
@@ -499,32 +530,13 @@ layout("/layouts/platform.html"){
|
|||||||
</el-form>
|
</el-form>
|
||||||
</el-drawer>
|
</el-drawer>
|
||||||
|
|
||||||
<el-dialog :append-to-body="true" :close-on-click-modal="false" :fullscreen="true" :visible.sync="richTextDialog" title="编辑说明" width="80%">
|
<el-dialog :append-to-body="true" :close-on-click-modal="false" :visible.sync="richTextDialog"
|
||||||
|
title="编辑说明" width="60%">
|
||||||
<el-row :gutter="60">
|
<el-row :gutter="60">
|
||||||
<el-col :span="12">
|
<el-col :span="24">
|
||||||
<div id="descRichText"></div>
|
<text-editor v-model="descRichTextContent"></text-editor>
|
||||||
</el-col>
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-card shadow="never">
|
|
||||||
<template #header>
|
|
||||||
<div style="display: flex; justify-content: space-between; align-items: center">
|
|
||||||
<h3 style="color: #1867b0">上传文件</h3>
|
|
||||||
<file-upload :files.sync="files" :max="10" :source="1" ref="fileUpload"></file-upload>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
<el-table :data="files" border class="mt10" height="260" stripe style="width: 100%">
|
|
||||||
<el-table-column label="文件名" prop="filename"></el-table-column>
|
|
||||||
<el-table-column label="文件路径" prop="url">
|
|
||||||
<template scope="{row}">{{APP_DOMAIN + FILE_STREAM_PREVIEW_ADDRESS + "?id=" + row.id}}</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column align="center" header-align="center" label="操作" width="100px">
|
|
||||||
<template slot-scope="{row,$index}">
|
|
||||||
<el-button @click="doCopy(row)" icon="el-icon-folder-checked" size="mini" type="primary">复制</el-button>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
</el-table>
|
|
||||||
</el-card>
|
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
<span class="dialog-footer" slot="footer">
|
<span class="dialog-footer" slot="footer">
|
||||||
@@ -571,20 +583,20 @@ layout("/layouts/platform.html"){
|
|||||||
offlineStores: []
|
offlineStores: []
|
||||||
},
|
},
|
||||||
tableColumns: [
|
tableColumns: [
|
||||||
{ prop: "year", label: "年度", sortable: true },
|
{prop: "year", label: "年度", sortable: true},
|
||||||
{ prop: "shoppingName", label: "供应商名称", sortable: true },
|
{prop: "shoppingName", label: "供应商名称", sortable: true},
|
||||||
{ prop: "userName", label: "联系人", sortable: true },
|
{prop: "userName", label: "联系人", sortable: true},
|
||||||
{ prop: "mobile", label: "联系方式" },
|
{prop: "mobile", label: "联系方式"},
|
||||||
{ prop: "typeName", label: "类型", sortable: true },
|
{prop: "typeName", label: "类型", sortable: true},
|
||||||
// {prop: 'welfareName', label: '所属福利', sortable: true},
|
// {prop: 'welfareName', label: '所属福利', sortable: true},
|
||||||
// {prop: 'qrCode', label: '二维码',},
|
// {prop: 'qrCode', label: '二维码',},
|
||||||
{ prop: "link", label: "网址" }
|
{prop: "link", label: "网址"}
|
||||||
// {prop: 'isEnable', label: '启用状态', sortable: true},
|
// {prop: 'isEnable', label: '启用状态', sortable: true},
|
||||||
],
|
],
|
||||||
rules: {
|
rules: {
|
||||||
year: [{ required: true, message: "必填", trigger: ["change", "blur"] }],
|
year: [{required: true, message: "必填", trigger: ["change", "blur"]}],
|
||||||
shoppingName: [{ required: true, message: "必填", trigger: ["change", "blur"] }],
|
shoppingName: [{required: true, message: "必填", trigger: ["change", "blur"]}],
|
||||||
typeName: [{ required: true, message: "必填", trigger: ["change", "blur"] }]
|
typeName: [{required: true, message: "必填", trigger: ["change", "blur"]}]
|
||||||
// loginName: [{required: true, message: '必填', trigger: ['change', 'blur']}],
|
// loginName: [{required: true, message: '必填', trigger: ['change', 'blur']}],
|
||||||
// mobile: [{required: true, message: '必填', trigger: ['change', 'blur']}],
|
// mobile: [{required: true, message: '必填', trigger: ['change', 'blur']}],
|
||||||
},
|
},
|
||||||
@@ -599,7 +611,8 @@ layout("/layouts/platform.html"){
|
|||||||
pageOrderBy: "",
|
pageOrderBy: "",
|
||||||
unionId: ""
|
unionId: ""
|
||||||
},
|
},
|
||||||
unionOptions: []
|
unionOptions: [],
|
||||||
|
descRichTextContent:"",
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
@@ -609,7 +622,7 @@ layout("/layouts/platform.html"){
|
|||||||
cancelButtonText: "取消",
|
cancelButtonText: "取消",
|
||||||
type: "warning"
|
type: "warning"
|
||||||
}).then(async () => {
|
}).then(async () => {
|
||||||
const resp = await $.post(loc() + "/doDeleteUser", { id: id })
|
const resp = await $.post(loc() + "/doDeleteUser", {id: id})
|
||||||
if (resp.code === 0) {
|
if (resp.code === 0) {
|
||||||
this.doSearch()
|
this.doSearch()
|
||||||
this.notifySuccess(resp.msg)
|
this.notifySuccess(resp.msg)
|
||||||
@@ -656,24 +669,13 @@ layout("/layouts/platform.html"){
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
getRichText() {
|
getRichText() {
|
||||||
this.$set(this.projectTableData[this.welfareIndex], "description", questionRichTextEditor.txt.html())
|
this.$set(this.projectTableData[this.welfareIndex], "description", this.descRichTextContent)
|
||||||
this.richTextDialog = false
|
this.richTextDialog = false
|
||||||
},
|
},
|
||||||
openDescRichText(richText, index) {
|
openDescRichText(richText, index) {
|
||||||
this.welfareIndex = index
|
this.welfareIndex = index
|
||||||
this.richTextDialog = true
|
this.richTextDialog = true
|
||||||
this.$nextTick(() => {
|
this.descRichTextContent=richText
|
||||||
$("#descRichText").html("")
|
|
||||||
questionRichTextEditor = new wangEditor("#descRichText")
|
|
||||||
questionRichTextEditor.config.onchange = (html) => {
|
|
||||||
richText = html ? html : ""
|
|
||||||
}
|
|
||||||
questionRichTextEditor.config.uploadImgShowBase64 = true
|
|
||||||
questionRichTextEditor.create()
|
|
||||||
if (richText) {
|
|
||||||
questionRichTextEditor.txt.html(richText)
|
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
},
|
||||||
closePopover(o) {
|
closePopover(o) {
|
||||||
const popovers = document.getElementsByClassName("el-popover")
|
const popovers = document.getElementsByClassName("el-popover")
|
||||||
@@ -683,7 +685,7 @@ layout("/layouts/platform.html"){
|
|||||||
o.imgUrl = null
|
o.imgUrl = null
|
||||||
},
|
},
|
||||||
onFileSuccess(response, file, fileList) {
|
onFileSuccess(response, file, fileList) {
|
||||||
const { data } = response
|
const {data} = response
|
||||||
this.$set(this.projectTableData[this.idx], "imgUrl", data.filepath)
|
this.$set(this.projectTableData[this.idx], "imgUrl", data.filepath)
|
||||||
this.$forceUpdate()
|
this.$forceUpdate()
|
||||||
},
|
},
|
||||||
@@ -691,7 +693,7 @@ layout("/layouts/platform.html"){
|
|||||||
this.idx = idx
|
this.idx = idx
|
||||||
},
|
},
|
||||||
openPackage(row) {
|
openPackage(row) {
|
||||||
if (!row.isEnable) {
|
if (row.isDisabled) {
|
||||||
this.notifyWarning("福利已开启,如需修改套餐请联系管理员")
|
this.notifyWarning("福利已开启,如需修改套餐请联系管理员")
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
@@ -708,7 +710,8 @@ layout("/layouts/platform.html"){
|
|||||||
.then((_) => {
|
.then((_) => {
|
||||||
done()
|
done()
|
||||||
})
|
})
|
||||||
.catch((_) => {})
|
.catch((_) => {
|
||||||
|
})
|
||||||
},
|
},
|
||||||
userChang(val) {
|
userChang(val) {
|
||||||
if (!val) {
|
if (!val) {
|
||||||
@@ -781,7 +784,7 @@ layout("/layouts/platform.html"){
|
|||||||
cancelButtonText: "取消",
|
cancelButtonText: "取消",
|
||||||
type: "warning"
|
type: "warning"
|
||||||
}).then(async () => {
|
}).then(async () => {
|
||||||
const resp = await $.post(loc() + "/doDelete", { id: id })
|
const resp = await $.post(loc() + "/doDelete", {id: id})
|
||||||
if (resp.code === 0) {
|
if (resp.code === 0) {
|
||||||
this.doSearch()
|
this.doSearch()
|
||||||
this.notifySuccess(resp.msg)
|
this.notifySuccess(resp.msg)
|
||||||
@@ -794,7 +797,7 @@ layout("/layouts/platform.html"){
|
|||||||
window.open(url)
|
window.open(url)
|
||||||
},
|
},
|
||||||
async isEnableChange(val, id) {
|
async isEnableChange(val, id) {
|
||||||
const resp = await $.post(loc() + "/isEnableChange", { isEnable: val, id: id })
|
const resp = await $.post(loc() + "/isEnableChange", {isEnable: val, id: id})
|
||||||
if (resp.code === 0) {
|
if (resp.code === 0) {
|
||||||
this.notifySuccess(resp.msg)
|
this.notifySuccess(resp.msg)
|
||||||
} else {
|
} else {
|
||||||
@@ -830,13 +833,13 @@ layout("/layouts/platform.html"){
|
|||||||
this.$refs.guava.edit()
|
this.$refs.guava.edit()
|
||||||
},
|
},
|
||||||
async getWelfare() {
|
async getWelfare() {
|
||||||
const resp = await $.get(loc() + "/welfareProjectList", { year: this.pageForm.year })
|
const resp = await $.get(loc() + "/welfareProjectList", {year: this.pageForm.year})
|
||||||
this.projectOptions = resp.data
|
this.projectOptions = resp.data
|
||||||
},
|
},
|
||||||
async submit() {
|
async submit() {
|
||||||
this.$refs["addForm"].validate(async (valid) => {
|
this.$refs["addForm"].validate(async (valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
const resp = await $.post(loc() + "/submit", { shoppingType: JSON.stringify(this.formData) })
|
const resp = await $.post(loc() + "/submit", {shoppingType: JSON.stringify(this.formData)})
|
||||||
if (resp.code === 0) {
|
if (resp.code === 0) {
|
||||||
this.doSearch()
|
this.doSearch()
|
||||||
this.$refs.guava.index()
|
this.$refs.guava.index()
|
||||||
@@ -875,7 +878,7 @@ layout("/layouts/platform.html"){
|
|||||||
},
|
},
|
||||||
async getWelfareBySchoolWelfareId() {
|
async getWelfareBySchoolWelfareId() {
|
||||||
if (this.viewData.schoolWelfareId) {
|
if (this.viewData.schoolWelfareId) {
|
||||||
const resp = await $.post(loc() + "/getWelfareBySchoolWelfareId", { schoolWelfareId: this.viewData.schoolWelfareId })
|
const resp = await $.post(loc() + "/getWelfareBySchoolWelfareId", {schoolWelfareId: this.viewData.schoolWelfareId})
|
||||||
if (resp.code === 0) {
|
if (resp.code === 0) {
|
||||||
resp.data.map((v) => {
|
resp.data.map((v) => {
|
||||||
let name = v.choiceTimeEnd < moment().format("YYYY-MM-DD HH:mm:ss") ? "(已选完)" : "(未选完)"
|
let name = v.choiceTimeEnd < moment().format("YYYY-MM-DD HH:mm:ss") ? "(已选完)" : "(未选完)"
|
||||||
|
|||||||
@@ -95,7 +95,9 @@ layout("/layouts/platform.html"){
|
|||||||
<el-card class="mt10" shadow="never">
|
<el-card class="mt10" shadow="never">
|
||||||
<table-tool :app="this" label="福利项目">
|
<table-tool :app="this" label="福利项目">
|
||||||
<template #func>
|
<template #func>
|
||||||
<el-button @click="openAdd" icon="el-icon-plus" size="small" type="primary" v-if="judgmentAuthority">新建福利项目</el-button>
|
<el-button @click="openAdd" icon="el-icon-plus" size="small" type="primary"
|
||||||
|
v-if="judgmentAuthority">新建福利项目
|
||||||
|
</el-button>
|
||||||
</template>
|
</template>
|
||||||
</table-tool>
|
</table-tool>
|
||||||
|
|
||||||
@@ -131,7 +133,9 @@ layout("/layouts/platform.html"){
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col span="8">
|
<el-col span="8">
|
||||||
<el-form-item label="签收形式">{{welfareSignMode.find(v=>v.code==row.signMode).description}}</el-form-item>
|
<el-form-item label="签收形式">
|
||||||
|
{{welfareSignMode.find(v=>v.code==row.signMode).description}}
|
||||||
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
</el-form>
|
</el-form>
|
||||||
@@ -185,17 +189,25 @@ layout("/layouts/platform.html"){
|
|||||||
</el-button>
|
</el-button>
|
||||||
<el-dropdown-menu slot="dropdown">
|
<el-dropdown-menu slot="dropdown">
|
||||||
<el-dropdown-item :command="{type:'openCode',data:row}">二维码</el-dropdown-item>
|
<el-dropdown-item :command="{type:'openCode',data:row}">二维码</el-dropdown-item>
|
||||||
<el-dropdown-item :command="{type:'status',data:row}">{{row.isDisabled?'发布':'关闭'}}</el-dropdown-item>
|
<el-dropdown-item :command="{type:'status',data:row}">
|
||||||
<el-dropdown-item :command="{type:'sendMsg',data:row}">通知未选择人员</el-dropdown-item>
|
{{row.isDisabled?'发布':'关闭'}}
|
||||||
<el-dropdown-item :command="{type:'createList2',data:row}" v-if="row.created">更新福利名单</el-dropdown-item>
|
</el-dropdown-item>
|
||||||
|
<el-dropdown-item :command="{type:'sendMsg',data:row}">通知未选择人员
|
||||||
|
</el-dropdown-item>
|
||||||
|
<el-dropdown-item :command="{type:'createList2',data:row}" v-if="row.created">
|
||||||
|
更新福利名单
|
||||||
|
</el-dropdown-item>
|
||||||
|
|
||||||
<el-dropdown-item :command="{type:'createList',data:row}" v-if="judgmentAuthority">
|
<el-dropdown-item :command="{type:'createList',data:row}" v-if="judgmentAuthority">
|
||||||
{{row.created?'重置福利名单':'生成福利名单'}}
|
{{row.created?'重置福利名单':'生成福利名单'}}
|
||||||
</el-dropdown-item>
|
</el-dropdown-item>
|
||||||
|
|
||||||
<el-dropdown-item :command="{type:'edit',data:row}" v-if="judgmentAuthority">编辑</el-dropdown-item>
|
<el-dropdown-item :command="{type:'edit',data:row}" v-if="judgmentAuthority">编辑
|
||||||
|
</el-dropdown-item>
|
||||||
|
|
||||||
<el-dropdown-item :command="{type:'delete',data:row}" v-if="judgmentAuthority">删除</el-dropdown-item>
|
<el-dropdown-item :command="{type:'delete',data:row}" v-if="judgmentAuthority">
|
||||||
|
删除
|
||||||
|
</el-dropdown-item>
|
||||||
</el-dropdown-menu>
|
</el-dropdown-menu>
|
||||||
</el-dropdown>
|
</el-dropdown>
|
||||||
</template>
|
</template>
|
||||||
@@ -216,7 +228,8 @@ layout("/layouts/platform.html"){
|
|||||||
<el-row>
|
<el-row>
|
||||||
<el-col span="12">
|
<el-col span="12">
|
||||||
<el-form-item label="发放节日" prop="festival">
|
<el-form-item label="发放节日" prop="festival">
|
||||||
<el-select filterable placeholder="发放节日" style="width: 100%" v-model="formData.festival">
|
<el-select filterable placeholder="发放节日" style="width: 100%"
|
||||||
|
v-model="formData.festival">
|
||||||
<el-option :key="f" :label="f" :value="f" v-for="f in festival"></el-option>
|
<el-option :key="f" :label="f" :value="f" v-for="f in festival"></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@@ -279,63 +292,75 @@ layout("/layouts/platform.html"){
|
|||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col span="4">
|
<el-col span="8">
|
||||||
<el-form-item label="是否福利套餐" prop="flexible">
|
<el-form-item label="是否福利套餐" prop="flexible">
|
||||||
<el-switch @change="isCheckBoxChange" v-model="formData.flexible"></el-switch>
|
<el-radio-group v-model="formData.flexible" @change="isCheckBoxChange">
|
||||||
|
<el-radio :label="false" border>非套餐</el-radio>
|
||||||
|
<el-radio :label="true" border>套餐</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col span="4">
|
<el-col span="8">
|
||||||
<el-form-item label="是否补发生日蛋糕券" prop="isYearBirthday">
|
<el-form-item label="是否积分模式" prop="isIntegralMode">
|
||||||
<el-switch v-model="formData.isYearBirthday"></el-switch>
|
<el-radio-group v-model="formData.isIntegralMode">
|
||||||
|
<el-radio :label="false" border>非积分模式</el-radio>
|
||||||
|
<el-radio :label="true" border>积分模式</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<!-- <el-col span="6">
|
<el-col span="8" v-if="formData.isIntegralMode">
|
||||||
<el-form-item label="是否常规" prop="isRoutine" v-if="formData.flexible">
|
<el-form-item label="总积分" prop="allIntegral">
|
||||||
<el-switch v-model="formData.isRoutine">
|
<el-input-number v-model="formData.allIntegral" style="width: 100%" min="0"></el-input-number>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row>
|
||||||
|
<el-col span="6">
|
||||||
|
<el-form-item label="是否全年生日蛋糕券" prop="isYearBirthday">
|
||||||
|
<el-switch v-model="formData.isYearBirthday">
|
||||||
</el-switch>
|
</el-switch>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>-->
|
</el-col>
|
||||||
|
<el-col span="6">
|
||||||
<el-col span="4" v-if="formData.isRoutine">
|
<el-form-item label="是否多选" prop="isCheckBox" v-if="formData.isRoutine">
|
||||||
<el-form-item label="是否多选" prop="isCheckBox">
|
|
||||||
<el-switch
|
<el-switch
|
||||||
@change="isCheckBoxChange"
|
|
||||||
active-value="checkBox"
|
|
||||||
inactive-value="radio"
|
|
||||||
v-model="formData.isCheckBox"
|
v-model="formData.isCheckBox"
|
||||||
></el-switch>
|
active-value="checkBox"
|
||||||
|
inactive-value="radio" @change="isCheckBoxChange">
|
||||||
|
</el-switch>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<template v-if="formData.isCheckBox=='checkBox'">
|
<el-col span="6">
|
||||||
<el-col span="4">
|
<el-form-item label="最多选几个" prop="multiSelectNum"
|
||||||
<el-form-item label="是否支持单个多选" prop="singleOptionSupportMultipleSelection">
|
v-if="formData.isCheckBox=='checkBox'">
|
||||||
<el-switch v-model="formData.singleOptionSupportMultipleSelection"></el-switch>
|
<el-input-number v-model="formData.multiSelectNum" placeholder="最多选几个"
|
||||||
|
:min="2" :max="10"></el-input-number>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|
||||||
<el-col span="4">
|
|
||||||
<el-form-item label="最多选几个" prop="multiSelectNum">
|
|
||||||
<el-input-number :max="10" :min="2" placeholder="最多选几个" v-model="formData.multiSelectNum"></el-input-number>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
</template>
|
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
<el-form-item label="人员核对名单" prop="taskId" v-if="formData.isYearBirthday">
|
<el-form-item label="人员核对名单" prop="taskId" v-if="formData.isYearBirthday">
|
||||||
<el-select filterable placeholder="请选择人员核对名单" style="width: 100%" v-model="formData.taskId">
|
<el-select filterable placeholder="请选择人员核对名单" style="width: 100%"
|
||||||
<el-option :label="item.taskName" :value="item.id" v-for="item in memberCheckTaskOptions"></el-option>
|
v-model="formData.taskId">
|
||||||
|
<el-option :label="item.taskName" :value="item.id"
|
||||||
|
v-for="item in memberCheckTaskOptions"></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item label="发放形式" prop="provideMode">
|
<el-form-item label="发放形式" prop="provideMode">
|
||||||
<el-radio-group size="medium" v-model="formData.provideMode">
|
<el-radio-group size="medium" v-model="formData.provideMode">
|
||||||
<el-radio-button :key="item.code" :label="item.code" v-for="item in welfareProvideMode">{{item.description}}</el-radio-button>
|
<el-radio-button :key="item.code" :label="item.code" v-for="item in welfareProvideMode">
|
||||||
|
{{item.description}}
|
||||||
|
</el-radio-button>
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item label="签收形式" prop="signMode">
|
<el-form-item label="签收形式" prop="signMode">
|
||||||
<el-radio-group size="medium" v-model="formData.signMode">
|
<el-radio-group size="medium" v-model="formData.signMode">
|
||||||
<el-radio-button :key="item.code" :label="item.code" v-for="item in welfareSignMode">{{item.description}}</el-radio-button>
|
<el-radio-button :key="item.code" :label="item.code" v-for="item in welfareSignMode">
|
||||||
|
{{item.description}}
|
||||||
|
</el-radio-button>
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
@@ -347,12 +372,15 @@ layout("/layouts/platform.html"){
|
|||||||
<!-- </el-form-item>-->
|
<!-- </el-form-item>-->
|
||||||
|
|
||||||
<el-form-item label="福利礼品" prop="gift" v-if="!formData.flexible">
|
<el-form-item label="福利礼品" prop="gift" v-if="!formData.flexible">
|
||||||
<el-input maxlength="100" placeholder="福利礼品" suffix-icon="el-icon-present" v-model="formData.gift"></el-input>
|
<el-input maxlength="100" placeholder="福利礼品" suffix-icon="el-icon-present"
|
||||||
|
v-model="formData.gift"></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<template v-if="formData.flexible">
|
<template v-if="formData.flexible">
|
||||||
<el-form-item label="福利选项" v-if="[2,3,4].includes(formData.provideMode)">
|
<el-form-item label="福利选项" v-if="[2,3,4].includes(formData.provideMode)">
|
||||||
<question-naire :subject="formData.welfareProjectSubjects" ref="questionNaire"></question-naire>
|
<question-naire :subject="formData.welfareProjectSubjects"
|
||||||
|
:is_integral_mode="formData.isIntegralMode"
|
||||||
|
ref="questionNaire"></question-naire>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -407,7 +435,8 @@ layout("/layouts/platform.html"){
|
|||||||
</el-row>
|
</el-row>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
|
||||||
<el-dialog :close-on-click-modal="false" :visible.sync="sendMsgDialogVisible" title="请在下方填写需要发送的内容" width="50%">
|
<el-dialog :close-on-click-modal="false" :visible.sync="sendMsgDialogVisible" title="请在下方填写需要发送的内容"
|
||||||
|
width="50%">
|
||||||
<el-form :model="formData" label-width="80px" ref="sendForm">
|
<el-form :model="formData" label-width="80px" ref="sendForm">
|
||||||
<!-- <el-form-item
|
<!-- <el-form-item
|
||||||
:rules="[{required: true, message: '请选择发送方式', trigger: ['blur', 'change']}]"
|
:rules="[{required: true, message: '请选择发送方式', trigger: ['blur', 'change']}]"
|
||||||
@@ -419,7 +448,8 @@ layout("/layouts/platform.html"){
|
|||||||
</el-checkbox-group>
|
</el-checkbox-group>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
-->
|
-->
|
||||||
<el-form-item :rules="[{required: true, message: '请选择发送内容', trigger: ['blur', 'change']}]" label="发送内容" prop="content">
|
<el-form-item :rules="[{required: true, message: '请选择发送内容', trigger: ['blur', 'change']}]"
|
||||||
|
label="发送内容" prop="content">
|
||||||
<el-input :rows="6" placeholder="请输入内容" type="textarea" v-model="formData.content"></el-input>
|
<el-input :rows="6" placeholder="请输入内容" type="textarea" v-model="formData.content"></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
@@ -451,13 +481,13 @@ layout("/layouts/platform.html"){
|
|||||||
value: "sex",
|
value: "sex",
|
||||||
type: "select",
|
type: "select",
|
||||||
options: [
|
options: [
|
||||||
{ label: "男", value: "男" },
|
{label: "男", value: "男"},
|
||||||
{ label: "女", value: "女" }
|
{label: "女", value: "女"}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{ label: "出生日期", value: "birthday", type: "date" },
|
{label: "出生日期", value: "birthday", type: "date"},
|
||||||
{ label: "是否会员", value: "member" },
|
{label: "是否会员", value: "member"},
|
||||||
{ label: "是否福利会员", value: "welfareMember" }
|
{label: "是否福利会员", value: "welfareMember"}
|
||||||
],
|
],
|
||||||
|
|
||||||
welfareProvideMode: [],
|
welfareProvideMode: [],
|
||||||
@@ -467,23 +497,23 @@ layout("/layouts/platform.html"){
|
|||||||
year: moment().format("YYYY")
|
year: moment().format("YYYY")
|
||||||
},
|
},
|
||||||
tableColumns: [
|
tableColumns: [
|
||||||
{ prop: "year", label: "年度" },
|
{prop: "year", label: "年度"},
|
||||||
{ prop: "name", label: "项目名称" },
|
{prop: "name", label: "项目名称"},
|
||||||
{ prop: "gift", label: "福利礼品" },
|
{prop: "gift", label: "福利礼品"},
|
||||||
{ prop: "provideTimeStart", label: "发放时间" }
|
{prop: "provideTimeStart", label: "发放时间"}
|
||||||
],
|
],
|
||||||
formRules: {
|
formRules: {
|
||||||
name: [{ required: true, message: "必填", trigger: ["blur", "change"] }],
|
name: [{required: true, message: "必填", trigger: ["blur", "change"]}],
|
||||||
festival: [{ required: true, message: "必选", trigger: ["blur", "change"] }],
|
festival: [{required: true, message: "必选", trigger: ["blur", "change"]}],
|
||||||
provideTime: [{ required: true, message: "必选", trigger: ["blur", "change"] }],
|
provideTime: [{required: true, message: "必选", trigger: ["blur", "change"]}],
|
||||||
choiceTime: [{ required: true, message: "必选", trigger: ["blur", "change"] }],
|
choiceTime: [{required: true, message: "必选", trigger: ["blur", "change"]}],
|
||||||
provideAddress: [{ required: true, message: "必选", trigger: ["blur", "change"] }],
|
provideAddress: [{required: true, message: "必选", trigger: ["blur", "change"]}],
|
||||||
provideMode: [{ required: true, message: "必选", trigger: ["blur", "change"] }],
|
provideMode: [{required: true, message: "必选", trigger: ["blur", "change"]}],
|
||||||
signMode: [{ required: true, message: "必选", trigger: ["blur", "change"] }],
|
signMode: [{required: true, message: "必选", trigger: ["blur", "change"]}],
|
||||||
noticePushMode: [{ required: true, message: "必选", trigger: ["blur", "change"] }],
|
noticePushMode: [{required: true, message: "必选", trigger: ["blur", "change"]}],
|
||||||
gift: [{ required: true, message: "必填", trigger: ["blur", "change"] }],
|
gift: [{required: true, message: "必填", trigger: ["blur", "change"]}],
|
||||||
multiSelectNum: [{ required: true, message: "必填", trigger: ["blur", "change"] }],
|
multiSelectNum: [{required: true, message: "必填", trigger: ["blur", "change"]}],
|
||||||
taskId: [{ required: true, message: "必填", trigger: ["blur", "change"] }]
|
taskId: [{required: true, message: "必填", trigger: ["blur", "change"]}]
|
||||||
},
|
},
|
||||||
welfare,
|
welfare,
|
||||||
welfareUnitMode,
|
welfareUnitMode,
|
||||||
@@ -506,10 +536,10 @@ layout("/layouts/platform.html"){
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
async getMemberCheckTaskOptions() {
|
async getMemberCheckTaskOptions() {
|
||||||
const resp = await $.get("/platform/welfareMember/check/task/getAllTask", { year: this.pageForm.year })
|
const resp = await $.get("/platform/welfareMember/check/task/getAllTask", {year: this.pageForm.year})
|
||||||
this.memberCheckTaskOptions = resp.data.filter((item) => item.welfareCheckFilterMode === 2)
|
this.memberCheckTaskOptions = resp.data.filter((item) => item.welfareCheckFilterMode === 2)
|
||||||
},
|
},
|
||||||
async projectStatusChange({ id, isDisabled: val }) {
|
async projectStatusChange({id, isDisabled: val}) {
|
||||||
const resp = await $.post(loc() + "/projectStatusChange", {
|
const resp = await $.post(loc() + "/projectStatusChange", {
|
||||||
id,
|
id,
|
||||||
val
|
val
|
||||||
@@ -767,7 +797,7 @@ layout("/layouts/platform.html"){
|
|||||||
if ("confirm" == a) {
|
if ("confirm" == a) {
|
||||||
//确认后再执行
|
//确认后再执行
|
||||||
this.submitLoading = true
|
this.submitLoading = true
|
||||||
const resp = await $.post(loc() + "/delete", { id })
|
const resp = await $.post(loc() + "/delete", {id})
|
||||||
if (resp.code === 0) {
|
if (resp.code === 0) {
|
||||||
this.pageData()
|
this.pageData()
|
||||||
this.notifySuccess(resp.msg)
|
this.notifySuccess(resp.msg)
|
||||||
@@ -780,7 +810,7 @@ layout("/layouts/platform.html"){
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
dropdownCommand(command) {
|
dropdownCommand(command) {
|
||||||
const { type, data } = command
|
const {type, data} = command
|
||||||
this.welfare_id = data.id
|
this.welfare_id = data.id
|
||||||
if (type == "view") {
|
if (type == "view") {
|
||||||
this.openView(data.id)
|
this.openView(data.id)
|
||||||
@@ -804,7 +834,7 @@ layout("/layouts/platform.html"){
|
|||||||
},
|
},
|
||||||
async openEdit(row) {
|
async openEdit(row) {
|
||||||
this.submitLoading = true
|
this.submitLoading = true
|
||||||
const resp = await $.get(loc() + "/findOne", { id: row.id })
|
const resp = await $.get(loc() + "/findOne", {id: row.id})
|
||||||
this.submitLoading = false
|
this.submitLoading = false
|
||||||
if (resp.code === 0) {
|
if (resp.code === 0) {
|
||||||
const data = resp.data
|
const data = resp.data
|
||||||
@@ -892,7 +922,7 @@ layout("/layouts/platform.html"){
|
|||||||
value: "personType",
|
value: "personType",
|
||||||
type: "select",
|
type: "select",
|
||||||
options: personType.map((v) => {
|
options: personType.map((v) => {
|
||||||
return { label: v.name, value: v.code }
|
return {label: v.name, value: v.code}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -900,7 +930,7 @@ layout("/layouts/platform.html"){
|
|||||||
value: "userState",
|
value: "userState",
|
||||||
type: "select",
|
type: "select",
|
||||||
options: userState.map((v) => {
|
options: userState.map((v) => {
|
||||||
return { label: v.name, value: v.code }
|
return {label: v.name, value: v.code}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -130,7 +130,9 @@ layout("/layouts/platform.html"){
|
|||||||
|
|
||||||
<el-table-column align="center" header-align="center" label="操作" prop="userOnline" width="150px">
|
<el-table-column align="center" header-align="center" label="操作" prop="userOnline" width="150px">
|
||||||
<template scope="{row}">
|
<template scope="{row}">
|
||||||
<el-button type="primary" size="mini" @click="openChoose(row)">{{confirmButtonInfo(row).text}}</el-button>
|
<el-button type="primary" size="mini" @click="openChoose(row)">
|
||||||
|
{{confirmButtonInfo(row).text}}
|
||||||
|
</el-button>
|
||||||
|
|
||||||
<!-- <el-button @click="openChoose(row)" size="mini" type="primary"-->
|
<!-- <el-button @click="openChoose(row)" size="mini" type="primary"-->
|
||||||
<!-- v-if="new Date().getTime()>moment(row.choiceTimeStart).valueOf()-->
|
<!-- v-if="new Date().getTime()>moment(row.choiceTimeStart).valueOf()-->
|
||||||
@@ -165,7 +167,8 @@ layout("/layouts/platform.html"){
|
|||||||
<el-form-item label="福利礼品">{{projectInfo.gift}}</el-form-item>
|
<el-form-item label="福利礼品">{{projectInfo.gift}}</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col span="8">
|
<el-col span="8">
|
||||||
<el-form-item label="选择形式">{{projectInfo.isCheckBox==='checkBox'?'多选':'单选'}}</el-form-item>
|
<el-form-item label="选择形式">{{projectInfo.isCheckBox==='checkBox'?'多选':'单选'}}
|
||||||
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col span="8" v-if="projectInfo.isCheckBox==='checkBox'">
|
<el-col span="8" v-if="projectInfo.isCheckBox==='checkBox'">
|
||||||
<el-form-item label="最多选几个">{{projectInfo.multiSelectNum}}个</el-form-item>
|
<el-form-item label="最多选几个">{{projectInfo.multiSelectNum}}个</el-form-item>
|
||||||
@@ -187,7 +190,14 @@ layout("/layouts/platform.html"){
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col span="8">
|
<el-col span="8">
|
||||||
<el-form-item label="选择时间">{{projectInfo.choiceTimeStart}}至{{projectInfo.choiceTimeEnd}}</el-form-item>
|
<el-form-item label="选择时间">
|
||||||
|
{{projectInfo.choiceTimeStart}}至{{projectInfo.choiceTimeEnd}}
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col span="8" v-if="projectInfo.isIntegralMode">
|
||||||
|
<el-form-item label="福利总积分">
|
||||||
|
{{projectInfo.allIntegral}}
|
||||||
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
@@ -199,7 +209,8 @@ layout("/layouts/platform.html"){
|
|||||||
<div slot="header" style="display: flex; justify-content: space-between">
|
<div slot="header" style="display: flex; justify-content: space-between">
|
||||||
<div style="color: #000; font-size: 18px">{{option.optionName}}</div>
|
<div style="color: #000; font-size: 18px">{{option.optionName}}</div>
|
||||||
<div>
|
<div>
|
||||||
<el-button @click.stop="viewDesc(option)" type="text">套餐详情</el-button>
|
<el-button @click.stop="viewDesc(option)" type="text">套餐详情
|
||||||
|
</el-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -239,8 +250,13 @@ layout("/layouts/platform.html"){
|
|||||||
v-model="option.selectNum"
|
v-model="option.selectNum"
|
||||||
></el-input-number>
|
></el-input-number>
|
||||||
</div>
|
</div>
|
||||||
|
<div style="width: 150px; position: absolute; right: 0; top: 160px;color:#ac3111;"
|
||||||
|
v-if="projectInfo.isIntegralMode">
|
||||||
|
所需积分:{{option.integral}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
<div style="margin-top: 17px">
|
<div style="margin-top: 17px">
|
||||||
<el-select
|
<el-select
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
@@ -353,6 +369,8 @@ layout("/layouts/platform.html"){
|
|||||||
</el-card>
|
</el-card>
|
||||||
|
|
||||||
<el-row class="mt20" justify="end" type="flex">
|
<el-row class="mt20" justify="end" type="flex">
|
||||||
|
<span style="display:flex;align-items: center;margin-right: 10px;color: #ac3111"
|
||||||
|
v-if="projectInfo.isIntegralMode">总消耗积分:{{totalIntegral}}</span>
|
||||||
<el-button @click="$refs.guava.index()">关闭</el-button>
|
<el-button @click="$refs.guava.index()">关闭</el-button>
|
||||||
<el-button @click="doChoose" type="primary" v-if="!isView">确定</el-button>
|
<el-button @click="doChoose" type="primary" v-if="!isView">确定</el-button>
|
||||||
</el-row>
|
</el-row>
|
||||||
@@ -366,7 +384,8 @@ layout("/layouts/platform.html"){
|
|||||||
</el-drawer>
|
</el-drawer>
|
||||||
|
|
||||||
<el-dialog :close-on-click-modal="false" :visible.sync="addressDialogVisible" title="收货地址" width="40%">
|
<el-dialog :close-on-click-modal="false" :visible.sync="addressDialogVisible" title="收货地址" width="40%">
|
||||||
<el-form :model="formData" label-position="right" :rules="formRules" label-suffix=":" label-width="120px" ref="addForm">
|
<el-form :model="formData" label-position="right" :rules="formRules" label-suffix=":" label-width="120px"
|
||||||
|
ref="addForm">
|
||||||
<el-row :gutter="60">
|
<el-row :gutter="60">
|
||||||
<el-col :span="24">
|
<el-col :span="24">
|
||||||
<el-form-item label="地址信息" prop="addressList">
|
<el-form-item label="地址信息" prop="addressList">
|
||||||
@@ -400,7 +419,8 @@ layout("/layouts/platform.html"){
|
|||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="24">
|
<el-col :span="24">
|
||||||
<el-form-item label="手机号码" prop="tel">
|
<el-form-item label="手机号码" prop="tel">
|
||||||
<el-input maxlength="11" placeholder="请填写手机号码" clearable v-model="formData.tel"></el-input>
|
<el-input maxlength="11" placeholder="请填写手机号码" clearable
|
||||||
|
v-model="formData.tel"></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|
||||||
@@ -449,12 +469,12 @@ layout("/layouts/platform.html"){
|
|||||||
year: moment().format("YYYY")
|
year: moment().format("YYYY")
|
||||||
},
|
},
|
||||||
tableColumns: [
|
tableColumns: [
|
||||||
{ prop: "year", label: "年度" },
|
{prop: "year", label: "年度"},
|
||||||
{ prop: "name", label: "项目名称" },
|
{prop: "name", label: "项目名称"},
|
||||||
{ prop: "choiceTime", label: "选择时间" },
|
{prop: "choiceTime", label: "选择时间"},
|
||||||
{ prop: "isChoose", label: "是否选择" },
|
{prop: "isChoose", label: "是否选择"},
|
||||||
{ prop: "gist_list", label: "所选福利" },
|
{prop: "gist_list", label: "所选福利"},
|
||||||
{ prop: "receiveAddress", label: "收货地址" }
|
{prop: "receiveAddress", label: "收货地址"}
|
||||||
],
|
],
|
||||||
isView: false,
|
isView: false,
|
||||||
isChoice: false,
|
isChoice: false,
|
||||||
@@ -462,25 +482,26 @@ layout("/layouts/platform.html"){
|
|||||||
addressDialogVisible: false,
|
addressDialogVisible: false,
|
||||||
|
|
||||||
formRules: {
|
formRules: {
|
||||||
addressList: [{ required: true, message: "请选择地址信息", trigger: ["blur", "change"] }],
|
addressList: [{required: true, message: "请选择地址信息", trigger: ["blur", "change"]}],
|
||||||
addressDetail: [{ required: true, message: "请填写您的详细地址", trigger: ["blur", "change"] }],
|
addressDetail: [{required: true, message: "请填写您的详细地址", trigger: ["blur", "change"]}],
|
||||||
userName: [{ required: true, message: "请填写收货人姓名", trigger: ["blur", "change"] }],
|
userName: [{required: true, message: "请填写收货人姓名", trigger: ["blur", "change"]}],
|
||||||
tel: [
|
tel: [
|
||||||
{ required: true, message: "必填", trigger: ["blur", "change"] },
|
{required: true, message: "必填", trigger: ["blur", "change"]},
|
||||||
{ pattern: /^1[3-9]\d{9}$/, message: "请输入正确的手机号" }
|
{pattern: /^1[3-9]\d{9}$/, message: "请输入正确的手机号"}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
addFormRules: {
|
addFormRules: {
|
||||||
mobile: [
|
mobile: [
|
||||||
{ required: true, message: "必填", trigger: ["blur", "change"] },
|
{required: true, message: "必填", trigger: ["blur", "change"]},
|
||||||
{ pattern: /^1[3-9]\d{9}$/, message: "请输入正确的手机号" }
|
{pattern: /^1[3-9]\d{9}$/, message: "请输入正确的手机号"}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|
||||||
// 供应商
|
// 供应商
|
||||||
shoppingType: [],
|
shoppingType: [],
|
||||||
// 门店地址
|
// 门店地址
|
||||||
offlineStoresOption: []
|
offlineStoresOption: [],
|
||||||
|
totalIntegral: 0,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@@ -500,30 +521,30 @@ layout("/layouts/platform.html"){
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
confirmButtonInfo(row) {
|
confirmButtonInfo(row) {
|
||||||
const { choiceTimeEnd, choiceTimeStart, overdueChoiceTimeEnd, isChoose, selectTime } = row
|
const {choiceTimeEnd, choiceTimeStart, overdueChoiceTimeEnd, isChoose, selectTime} = row
|
||||||
const now = moment().valueOf()
|
const now = moment().valueOf()
|
||||||
if (overdueChoiceTimeEnd == null || overdueChoiceTimeEnd === "") {
|
if (overdueChoiceTimeEnd == null || overdueChoiceTimeEnd === "") {
|
||||||
if (now > moment(choiceTimeStart).valueOf() && now < moment(choiceTimeEnd).valueOf()) {
|
if (now > moment(choiceTimeStart).valueOf() && now < moment(choiceTimeEnd).valueOf()) {
|
||||||
return { text: isChoose ? "修改" : "选择", disabled: false }
|
return {text: isChoose ? "修改" : "选择", disabled: false}
|
||||||
} else if (now > moment(choiceTimeEnd).valueOf()) {
|
} else if (now > moment(choiceTimeEnd).valueOf()) {
|
||||||
return { text: "选择已结束", disabled: true }
|
return {text: "选择已结束", disabled: true}
|
||||||
} else if (now < moment(choiceTimeStart).valueOf()) {
|
} else if (now < moment(choiceTimeStart).valueOf()) {
|
||||||
return { text: "选择未开始", disabled: true }
|
return {text: "选择未开始", disabled: true}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
//已选择了不能再动了
|
//已选择了不能再动了
|
||||||
if (isChoose) {
|
if (isChoose) {
|
||||||
if (moment(selectTime).valueOf() > moment(choiceTimeEnd).valueOf() && now < moment(overdueChoiceTimeEnd).valueOf()) {
|
if (moment(selectTime).valueOf() > moment(choiceTimeEnd).valueOf() && now < moment(overdueChoiceTimeEnd).valueOf()) {
|
||||||
return { text: "修改", disabled: false }
|
return {text: "修改", disabled: false}
|
||||||
}
|
}
|
||||||
return { text: "选择已结束", disabled: true }
|
return {text: "选择已结束", disabled: true}
|
||||||
} else {
|
} else {
|
||||||
if (now > moment(choiceTimeStart).valueOf() && now < moment(overdueChoiceTimeEnd).valueOf()) {
|
if (now > moment(choiceTimeStart).valueOf() && now < moment(overdueChoiceTimeEnd).valueOf()) {
|
||||||
return { text: isChoose ? "修改" : "选择", disabled: false }
|
return {text: isChoose ? "修改" : "选择", disabled: false}
|
||||||
} else if (now > moment(overdueChoiceTimeEnd).valueOf()) {
|
} else if (now > moment(overdueChoiceTimeEnd).valueOf()) {
|
||||||
return { text: "选择已结束", disabled: true }
|
return {text: "选择已结束", disabled: true}
|
||||||
} else if (now < moment(choiceTimeStart).valueOf()) {
|
} else if (now < moment(choiceTimeStart).valueOf()) {
|
||||||
return { text: "选择未开始", disabled: true }
|
return {text: "选择未开始", disabled: true}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -583,7 +604,20 @@ layout("/layouts/platform.html"){
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
handlePlusButtonClick(value, option, optionIndex) {
|
handlePlusButtonClick(value, option, optionIndex) {
|
||||||
const { isCheckBox, multiSelectNum, singleOptionSupportMultipleSelection } = this.projectInfo
|
const {
|
||||||
|
isIntegralMode,
|
||||||
|
isCheckBox,
|
||||||
|
multiSelectNum,
|
||||||
|
singleOptionSupportMultipleSelection
|
||||||
|
} = this.projectInfo
|
||||||
|
//积分模式
|
||||||
|
if (isIntegralMode) {
|
||||||
|
let totalIntegral = 0
|
||||||
|
this.projectInfo.welfareProjectSubjects[0].options.forEach(v => {
|
||||||
|
totalIntegral = totalIntegral + (v.integral * v.selectNum)
|
||||||
|
})
|
||||||
|
this.totalIntegral = totalIntegral
|
||||||
|
} else {
|
||||||
if (isCheckBox === "checkBox") {
|
if (isCheckBox === "checkBox") {
|
||||||
//判断是否支持单个多选
|
//判断是否支持单个多选
|
||||||
if (!singleOptionSupportMultipleSelection && value > 1) {
|
if (!singleOptionSupportMultipleSelection && value > 1) {
|
||||||
@@ -600,10 +634,11 @@ layout("/layouts/platform.html"){
|
|||||||
this.$set(this.projectInfo.welfareProjectSubjects[0].options[optionIndex], "selectNum", value - 1)
|
this.$set(this.projectInfo.welfareProjectSubjects[0].options[optionIndex], "selectNum", value - 1)
|
||||||
this.$message.warning("此次福利最多只能选择" + multiSelectNum + "份")
|
this.$message.warning("此次福利最多只能选择" + multiSelectNum + "份")
|
||||||
}
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
async getProjectInfo(id) {
|
async getProjectInfo(id) {
|
||||||
const resp = await $.get("/platform/welfare/common/findOne", { projectId: id })
|
const resp = await $.get("/platform/welfare/common/findOne", {projectId: id})
|
||||||
if (resp.code === 0) {
|
if (resp.code === 0) {
|
||||||
resp.data.multiSelectNum = resp.data.multiSelectNum ? resp.data.multiSelectNum : 1
|
resp.data.multiSelectNum = resp.data.multiSelectNum ? resp.data.multiSelectNum : 1
|
||||||
this.projectInfo = resp.data
|
this.projectInfo = resp.data
|
||||||
@@ -634,7 +669,7 @@ layout("/layouts/platform.html"){
|
|||||||
doChoose() {
|
doChoose() {
|
||||||
this.$refs["addForm"].validate(async (valid) => {
|
this.$refs["addForm"].validate(async (valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
const { isCheckBox, multiSelectNum, singleOptionSupportMultipleSelection } = this.projectInfo
|
const {isCheckBox, multiSelectNum, singleOptionSupportMultipleSelection} = this.projectInfo
|
||||||
if (isCheckBox === "checkBox") {
|
if (isCheckBox === "checkBox") {
|
||||||
if (this.sumSelectNum < multiSelectNum) {
|
if (this.sumSelectNum < multiSelectNum) {
|
||||||
//用户没有选择完
|
//用户没有选择完
|
||||||
@@ -656,13 +691,14 @@ layout("/layouts/platform.html"){
|
|||||||
.map((item) => {
|
.map((item) => {
|
||||||
return {
|
return {
|
||||||
optionName: item.optionName,
|
optionName: item.optionName,
|
||||||
|
receiveAddressList: item.receiveAddressList,
|
||||||
selectNum: item.selectNum,
|
selectNum: item.selectNum,
|
||||||
receiveAddress: item.receiveAddress
|
receiveAddress: item.receiveAddress
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
let isReceiveAddress = true
|
let isReceiveAddress = true
|
||||||
for (const item of chooseOptions) {
|
for (const item of chooseOptions) {
|
||||||
if (!item.receiveAddress) {
|
if (!item.receiveAddress && item.receiveAddressList.length > 0) {
|
||||||
this.$message.warning(item.optionName + "还没有选择收货门店哦")
|
this.$message.warning(item.optionName + "还没有选择收货门店哦")
|
||||||
isReceiveAddress = false
|
isReceiveAddress = false
|
||||||
break
|
break
|
||||||
@@ -697,22 +733,23 @@ layout("/layouts/platform.html"){
|
|||||||
selectNum: v.selectNum
|
selectNum: v.selectNum
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
console.log(formData)
|
const {code, msg, data} = await $.post("/platform/welfare/userChoose/confirmSelect", {
|
||||||
const { code, msg, data } = await $.post("/platform/welfare/userChoose/confirmSelect", {
|
|
||||||
welfareUserSelections: JSON.stringify(formData),
|
welfareUserSelections: JSON.stringify(formData),
|
||||||
projectId: this.projectInfo.id,
|
projectId: this.projectInfo.id,
|
||||||
mobile: this.formData.mobile
|
mobile: this.formData.mobile,
|
||||||
|
totalIntegral: this.totalIntegral * 100
|
||||||
})
|
})
|
||||||
if (code === 0) {
|
if (code === 0) {
|
||||||
this.$message.success("您已完成本次福利选择。")
|
this.$message.success("您已完成本次福利选择。")
|
||||||
|
this.doSearch()
|
||||||
|
this.$refs.guava.index()
|
||||||
} else {
|
} else {
|
||||||
this.$message({
|
this.$message({
|
||||||
message: msg,
|
message: msg,
|
||||||
type: "warning"
|
type: "warning"
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
this.doSearch()
|
|
||||||
this.$refs.guava.index()
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
@@ -748,7 +785,7 @@ layout("/layouts/platform.html"){
|
|||||||
},
|
},
|
||||||
//获取用户选择的数据
|
//获取用户选择的数据
|
||||||
async getUserSelection(projectId) {
|
async getUserSelection(projectId) {
|
||||||
const resp = await $.get("/platform/welfare/mine/getUserSelection", { projectId: projectId })
|
const resp = await $.get("/platform/welfare/mine/getUserSelection", {projectId: projectId})
|
||||||
this.userSelection = resp.data
|
this.userSelection = resp.data
|
||||||
this.echoUserSelection()
|
this.echoUserSelection()
|
||||||
},
|
},
|
||||||
@@ -767,7 +804,7 @@ layout("/layouts/platform.html"){
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
async getChoice() {
|
async getChoice() {
|
||||||
const resp = await $.get("/mobile/welfare/mine/isChoice", { projectId: this.projectInfo.id })
|
const resp = await $.get("/mobile/welfare/mine/isChoice", {projectId: this.projectInfo.id})
|
||||||
this.isChoice = resp.data
|
this.isChoice = resp.data
|
||||||
},
|
},
|
||||||
async selectUserAddress() {
|
async selectUserAddress() {
|
||||||
@@ -788,7 +825,7 @@ layout("/layouts/platform.html"){
|
|||||||
},
|
},
|
||||||
// 获取供应商
|
// 获取供应商
|
||||||
async getShoppingType() {
|
async getShoppingType() {
|
||||||
const { data } = await $.get("/platform/shoppingType/apply/getShoppingType")
|
const {data} = await $.get("/platform/shoppingType/apply/getShoppingType")
|
||||||
this.projectInfo.welfareProjectSubjects[0].options.forEach((item) => {
|
this.projectInfo.welfareProjectSubjects[0].options.forEach((item) => {
|
||||||
item.receiveAddressList = data.find((v) => v.id === item.shoppingId)?.offlineStores
|
item.receiveAddressList = data.find((v) => v.id === item.shoppingId)?.offlineStores
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user