commit
This commit is contained in:
@@ -8,6 +8,7 @@ import cn.afterturn.easypoi.excel.entity.TemplateExportParams;
|
|||||||
import cn.afterturn.easypoi.excel.entity.enmus.ExcelType;
|
import cn.afterturn.easypoi.excel.entity.enmus.ExcelType;
|
||||||
import cn.afterturn.easypoi.excel.entity.params.ExcelExportEntity;
|
import cn.afterturn.easypoi.excel.entity.params.ExcelExportEntity;
|
||||||
import cn.afterturn.easypoi.excel.export.ExcelExportService;
|
import cn.afterturn.easypoi.excel.export.ExcelExportService;
|
||||||
|
import cn.hutool.core.date.DateUtil;
|
||||||
import cn.hutool.core.io.FileUtil;
|
import cn.hutool.core.io.FileUtil;
|
||||||
import cn.hutool.core.lang.Assert;
|
import cn.hutool.core.lang.Assert;
|
||||||
import cn.hutool.core.util.ObjectUtil;
|
import cn.hutool.core.util.ObjectUtil;
|
||||||
@@ -106,6 +107,7 @@ public class WelfareListController {
|
|||||||
1 ELSE 0
|
1 ELSE 0
|
||||||
END AS isChoose,
|
END AS isChoose,
|
||||||
wl.id,
|
wl.id,
|
||||||
|
wl.unionid,
|
||||||
wl.username,
|
wl.username,
|
||||||
wl.loginname,
|
wl.loginname,
|
||||||
wl.personType,
|
wl.personType,
|
||||||
@@ -115,8 +117,13 @@ public class WelfareListController {
|
|||||||
wl.listId,
|
wl.listId,
|
||||||
wus.userSign,
|
wus.userSign,
|
||||||
wus.courierNumber,
|
wus.courierNumber,
|
||||||
wus.receiveAddress,
|
GROUP_CONCAT(
|
||||||
GROUP_CONCAT( DISTINCT wuso.optionName, '(', wus.receiveAddress, ')' ) AS receiveAddress2,
|
DISTINCT
|
||||||
|
CONCAT(
|
||||||
|
wuso.optionName,
|
||||||
|
IF(wus.receiveAddress IS NOT NULL AND wus.receiveAddress != '', CONCAT('(', wus.receiveAddress, ')'), '')
|
||||||
|
)
|
||||||
|
) AS receiveAddress,
|
||||||
GROUP_CONCAT( DISTINCT wuso.optionName, '(', wus.selectNum, '份)' ) AS gist_list
|
GROUP_CONCAT( DISTINCT wuso.optionName, '(', wus.selectNum, '份)' ) AS gist_list
|
||||||
FROM
|
FROM
|
||||||
view_welfare_list wl
|
view_welfare_list wl
|
||||||
@@ -161,11 +168,15 @@ public class WelfareListController {
|
|||||||
sql.setCondition(cnd);
|
sql.setCondition(cnd);
|
||||||
Pagination pagination = welfareListService.list(pageForm, sql);
|
Pagination pagination = welfareListService.list(pageForm, sql);
|
||||||
List<NutMap> mapList = pagination.getList();
|
List<NutMap> mapList = pagination.getList();
|
||||||
if (provideMode != 3) {
|
List<WelfareMemberUnionConfirm> confirms = projectService.dao().query(WelfareMemberUnionConfirm.class, Cnd.where("projectId", "=", projectId));
|
||||||
mapList.forEach(v -> {
|
|
||||||
v.put("receiveAddress",v.getString("receiveAddress2"));
|
mapList.forEach(v -> {
|
||||||
});
|
if (StrUtil.isNotBlank(v.getString("unionid"))) {
|
||||||
}
|
WelfareMemberUnionConfirm confirm = confirms.stream().filter(o -> o.getUnionId().equals(v.getString("unionid"))).findFirst().orElse(null);
|
||||||
|
v.setv("isAudit", confirm != null ? confirm.getIsAudit() : "");
|
||||||
|
v.setv("auditTime", confirm != null ? confirm.getAuditTime() : "");
|
||||||
|
}
|
||||||
|
});
|
||||||
pagination.setList(mapList);
|
pagination.setList(mapList);
|
||||||
return pagination;
|
return pagination;
|
||||||
}
|
}
|
||||||
@@ -652,4 +663,23 @@ public class WelfareListController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@At
|
||||||
|
@ViReturn
|
||||||
|
@RequiresPermissions("welfare.list.mange")
|
||||||
|
public Object doAuditUser(@Param(value = "projectId", required = false) String projectId,
|
||||||
|
@Param(value = "unionId", required = false) String unionId,
|
||||||
|
@Param(value = "flag") Boolean flag) {
|
||||||
|
if (flag) {
|
||||||
|
welfareListService.dao().update(WelfareMemberUnionConfirm.class, Chain.make("isAudit", true)
|
||||||
|
.add("auditTime", DateUtil.date()).add("auditUser", ShiroUtil.getUserId()),
|
||||||
|
Cnd.where("projectId", "=", projectId).and("unionId", "=", unionId));
|
||||||
|
} else {
|
||||||
|
welfareListService.dao().update(WelfareMemberUnionConfirm.class, Chain.make("isAudit", null)
|
||||||
|
.add("auditTime", null).add("auditUser", null),
|
||||||
|
Cnd.where("projectId", "=", projectId).and("unionId", "=", unionId));
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,15 +9,13 @@ import io.v.nutz.base.query.PageForm;
|
|||||||
import io.v.nutz.base.utils.MsgApi;
|
import io.v.nutz.base.utils.MsgApi;
|
||||||
import io.v.nutz.base.utils.Vi;
|
import io.v.nutz.base.utils.Vi;
|
||||||
import io.v.nutz.sys.models.Sys_home_activity;
|
import io.v.nutz.sys.models.Sys_home_activity;
|
||||||
|
import io.v.nutz.sys.models.Sys_union;
|
||||||
import io.v.nutz.sys.services.SysTaskService;
|
import io.v.nutz.sys.services.SysTaskService;
|
||||||
import io.v.nutz.task.services.TaskPlatformService;
|
import io.v.nutz.task.services.TaskPlatformService;
|
||||||
import io.v.nutz.zhgh.data.model.MatchConditionStructure;
|
import io.v.nutz.zhgh.data.model.MatchConditionStructure;
|
||||||
import io.v.nutz.zhgh.data.service.MatchConditionStructureService;
|
import io.v.nutz.zhgh.data.service.MatchConditionStructureService;
|
||||||
import io.v.nutz.zhgh.mobileHome.service.MobileHomeService;
|
import io.v.nutz.zhgh.mobileHome.service.MobileHomeService;
|
||||||
import io.v.nutz.zhgh.welfare.model.WelfareProject;
|
import io.v.nutz.zhgh.welfare.model.*;
|
||||||
import io.v.nutz.zhgh.welfare.model.WelfareProjectSubject;
|
|
||||||
import io.v.nutz.zhgh.welfare.model.WelfareProjectSubjectOption;
|
|
||||||
import io.v.nutz.zhgh.welfare.model.WelfareUserSelection;
|
|
||||||
import io.v.nutz.zhgh.welfare.service.WelfareListService;
|
import io.v.nutz.zhgh.welfare.service.WelfareListService;
|
||||||
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;
|
||||||
@@ -39,6 +37,7 @@ import org.nutz.mvc.annotation.Ok;
|
|||||||
import org.nutz.mvc.annotation.Param;
|
import org.nutz.mvc.annotation.Param;
|
||||||
import org.nutz.trans.Trans;
|
import org.nutz.trans.Trans;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@@ -237,6 +236,21 @@ public class WelfareProjectMangeController {
|
|||||||
dao.update(project);
|
dao.update(project);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
dao.clear(WelfareMemberUnionConfirm.class, Cnd.where("projectId","=",project.getId()));
|
||||||
|
List<Sys_union> unionList = dao.query(Sys_union.class, Cnd.NEW());
|
||||||
|
List<WelfareMemberUnionConfirm> confirmList = new ArrayList<>();
|
||||||
|
for (Sys_union union : unionList) {
|
||||||
|
WelfareMemberUnionConfirm confirm = new WelfareMemberUnionConfirm();
|
||||||
|
confirm.setId(R.UU32());
|
||||||
|
confirm.setProjectId(project.getId());
|
||||||
|
confirm.setUnionId(union.getId());
|
||||||
|
confirm.setIsAudit(false);
|
||||||
|
confirmList.add(confirm);
|
||||||
|
}
|
||||||
|
dao.fastInsert(confirmList);
|
||||||
|
|
||||||
|
|
||||||
Sys_home_activity sysHomeActivity = project.covertToSysHomeActivity();
|
Sys_home_activity sysHomeActivity = project.covertToSysHomeActivity();
|
||||||
sysHomeActivity.setEnable(true);
|
sysHomeActivity.setEnable(true);
|
||||||
dao.insertOrUpdate(sysHomeActivity);
|
dao.insertOrUpdate(sysHomeActivity);
|
||||||
|
|||||||
@@ -128,6 +128,12 @@ public class WelfareUserChooseController {
|
|||||||
@RequiresPermissions("welfare.user.choose")
|
@RequiresPermissions("welfare.user.choose")
|
||||||
public Result confirmSelect(@Param("welfareUserSelections") WelfareUserSelection[] welfareUserSelections,
|
public Result confirmSelect(@Param("welfareUserSelections") WelfareUserSelection[] welfareUserSelections,
|
||||||
String projectId) {
|
String projectId) {
|
||||||
|
|
||||||
|
int count = simpleService.dao().count(WelfareList.class, Cnd.where("projectId", "=", projectId).and("userId", "=", ShiroUtil.getUserId()));
|
||||||
|
if (count == 0) {
|
||||||
|
return Result.error("您暂无权限!");
|
||||||
|
}
|
||||||
|
|
||||||
//删除上次选择的
|
//删除上次选择的
|
||||||
simpleService.dao().clear(WelfareUserSelection.class,
|
simpleService.dao().clear(WelfareUserSelection.class,
|
||||||
Cnd.where("welfareId", "=", projectId)
|
Cnd.where("welfareId", "=", projectId)
|
||||||
|
|||||||
@@ -0,0 +1,49 @@
|
|||||||
|
package io.v.nutz.zhgh.welfare.model;
|
||||||
|
|
||||||
|
|
||||||
|
import io.v.nutz.base.model.BaseModel;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import org.nutz.dao.entity.annotation.*;
|
||||||
|
import org.nutz.dao.interceptor.annotation.PrevInsert;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@Table
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
public class WelfareMemberUnionConfirm extends BaseModel {
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@Name
|
||||||
|
@Comment("ID")
|
||||||
|
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||||
|
@PrevInsert(uu32 = true)
|
||||||
|
private String id;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@Comment("所属项目")
|
||||||
|
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||||
|
private String projectId;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@Comment("工会id")
|
||||||
|
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||||
|
private String unionId;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@Comment("是否确认")
|
||||||
|
@ColDefine(type = ColType.BOOLEAN)
|
||||||
|
private Boolean isAudit;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@Comment("确认时间")
|
||||||
|
@ColDefine(type = ColType.DATETIME)
|
||||||
|
private Date auditTime;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@Comment("操作人")
|
||||||
|
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||||
|
private String auditUser;
|
||||||
|
}
|
||||||
@@ -203,11 +203,14 @@ public class WelfareSingleServiceImpl extends ViServiceImpl<WelfareProject> impl
|
|||||||
boolean isThreeUnit = Globals.MyConfig.getBoolean("isThreeUnit");
|
boolean isThreeUnit = Globals.MyConfig.getBoolean("isThreeUnit");
|
||||||
Sql welfareUnitSql = Sqls.create("""
|
Sql welfareUnitSql = Sqls.create("""
|
||||||
SELECT
|
SELECT
|
||||||
unit.*
|
unit.*,
|
||||||
|
wmuc.isAudit
|
||||||
FROM
|
FROM
|
||||||
welfare_unit unit
|
welfare_unit unit
|
||||||
|
LEFT JOIN welfare_member_union_confirm wmuc ON wmuc.projectId = @projectId
|
||||||
|
AND wmuc.unionId = unit.welfareUnitId
|
||||||
$condition
|
$condition
|
||||||
""");
|
""").setParam("projectId", projectId);
|
||||||
CndPlus cnd = CndPlus.create();
|
CndPlus cnd = CndPlus.create();
|
||||||
|
|
||||||
if (!ShiroUtil.hasAnyRoles("sysadmin,SchoolUnionAdmin,SchoolUnionWelfareAdmin")) {
|
if (!ShiroUtil.hasAnyRoles("sysadmin,SchoolUnionAdmin,SchoolUnionWelfareAdmin")) {
|
||||||
|
|||||||
@@ -486,8 +486,8 @@ layout("/mobile/platform.html"){
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
addShopping(address) {
|
addShopping(address) {
|
||||||
this.$set(this.projectInfo.welfareProjectSubjects[0].options[this.optionIndex], "receiveAddress", address)
|
this.$set(this.selectedOptions[this.optionIndex], "receiveAddress", address)
|
||||||
this.projectInfo.welfareProjectSubjects[0].options[this.optionIndex].receiveAddress = address
|
this.selectedOptions[this.optionIndex].receiveAddress = address
|
||||||
this.shoppingPopup = false
|
this.shoppingPopup = false
|
||||||
},
|
},
|
||||||
async onSearchShoppingAddress() {
|
async onSearchShoppingAddress() {
|
||||||
|
|||||||
@@ -106,7 +106,7 @@ let commonColumns = [
|
|||||||
{prop: 'loginname', label: '工号', width: "100"},
|
{prop: 'loginname', label: '工号', width: "100"},
|
||||||
{prop: 'username', label: '姓名', width: "80"},
|
{prop: 'username', label: '姓名', width: "80"},
|
||||||
{prop: 'sex', label: '性别', sortable: true, width: '100px', checked: 0},
|
{prop: 'sex', label: '性别', sortable: true, width: '100px', checked: 0},
|
||||||
{prop: 'personType', label: '人员类型', sortable: true, width: "100"},
|
// {prop: 'personType', label: '人员类型', sortable: true, width: "100"},
|
||||||
{prop: 'userState', label: '在职状态', sortable: true, width: "100"},
|
{prop: 'userState', label: '在职状态', sortable: true, width: "100"},
|
||||||
{prop: 'unionname', label: '所属工会', sortable: true},
|
{prop: 'unionname', label: '所属工会', sortable: true},
|
||||||
{prop: 'unitname', label: '所属单位', sortable: true},
|
{prop: 'unitname', label: '所属单位', sortable: true},
|
||||||
|
|||||||
@@ -271,7 +271,13 @@ layout("/layouts/platform.html"){
|
|||||||
一键全部领取
|
一键全部领取
|
||||||
</el-button>
|
</el-button>
|
||||||
|
|
||||||
|
<el-button :disabled="moment(projectInfo.choiceTimeEnd).valueOf()<moment().valueOf()" type="primary" size="small"
|
||||||
|
@click="doAudit(true)">确认名单
|
||||||
|
</el-button>
|
||||||
|
<!-- 取消确认 -->
|
||||||
|
<el-button :disabled="moment(projectInfo.choiceTimeEnd).valueOf()<moment().valueOf()" type="danger" size="small"
|
||||||
|
@click="doAudit(false)">取消确认
|
||||||
|
</el-button>
|
||||||
<!-- <el-button :disabled="!pageForm.projectId" type="primary" size="small"
|
<!-- <el-button :disabled="!pageForm.projectId" type="primary" size="small"
|
||||||
icon="el-icon-download"
|
icon="el-icon-download"
|
||||||
@click="openExportWelFareList(pageForm.projectId)">导出签字表
|
@click="openExportWelFareList(pageForm.projectId)">导出签字表
|
||||||
@@ -280,12 +286,12 @@ layout("/layouts/platform.html"){
|
|||||||
icon="el-icon-download"
|
icon="el-icon-download"
|
||||||
@click="doExportWelfare(pageForm.projectId)">导出名单
|
@click="doExportWelfare(pageForm.projectId)">导出名单
|
||||||
</el-button>-->
|
</el-button>-->
|
||||||
<el-button :disabled="!pageForm.projectId" @click="openAdd"
|
<!-- <el-button :disabled="!pageForm.projectId" @click="openAdd"
|
||||||
icon="el-icon-plus"
|
icon="el-icon-plus"
|
||||||
size="small"
|
size="small"
|
||||||
type="primary"
|
type="primary"
|
||||||
v-if="${@shiro.hasRole('sysadmin')||@shiro.hasRole('H05')}">添加
|
v-if="${@shiro.hasRole('sysadmin')||@shiro.hasRole('H05')}">添加
|
||||||
</el-button>
|
</el-button>-->
|
||||||
</template>
|
</template>
|
||||||
</table-tool>
|
</table-tool>
|
||||||
|
|
||||||
@@ -329,21 +335,9 @@ layout("/layouts/platform.html"){
|
|||||||
style="height: 60px" v-if="row.userSign"></el-image>
|
style="height: 60px" v-if="row.userSign"></el-image>
|
||||||
<el-tag type="warning" v-else>暂无</el-tag>
|
<el-tag type="warning" v-else>暂无</el-tag>
|
||||||
</template>
|
</template>
|
||||||
<template scope="{row}" v-else-if="column.prop=='realWelfareUnitId'">
|
<template v-else-if="column.prop=='isAudit'" scope="{row}">
|
||||||
<span v-if="!row.editWelfareUnit">{{row.realWelfareUnitName}}</span>
|
<el-tag type="success" v-if="row.isAudit">已确认</el-tag>
|
||||||
<div v-else>
|
<el-tag type="info" v-else>未确认</el-tag>
|
||||||
<el-select clearable filterable
|
|
||||||
placeholder="请选择" size="small"
|
|
||||||
style="width: 160px"
|
|
||||||
v-model="row.modifiedWelfareUnitId">
|
|
||||||
<el-option
|
|
||||||
:key="item.welfareUnitId"
|
|
||||||
:label="item.welfareUnitName"
|
|
||||||
:value="item.welfareUnitId"
|
|
||||||
v-for="item in welfareUnits">
|
|
||||||
</el-option>
|
|
||||||
</el-select>
|
|
||||||
</div>
|
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="快递单号" prop="courierNumber" show-overflow-tooltip
|
<el-table-column label="快递单号" prop="courierNumber" show-overflow-tooltip
|
||||||
@@ -364,7 +358,7 @@ layout("/layouts/platform.html"){
|
|||||||
<!-- 领取-->
|
<!-- 领取-->
|
||||||
<!-- </el-button>-->
|
<!-- </el-button>-->
|
||||||
<el-button @click="openEditWelfare(row)" size="mini" type="primary"
|
<el-button @click="openEditWelfare(row)" size="mini" type="primary"
|
||||||
v-if="pageFormSignMode!==1">
|
:disabled="moment(projectInfo.choiceTimeEnd).valueOf()<moment().valueOf()">
|
||||||
编辑
|
编辑
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button @click="doDelete(row)" size="mini" type="danger"
|
<el-button @click="doDelete(row)" size="mini" type="danger"
|
||||||
@@ -637,7 +631,9 @@ layout("/layouts/platform.html"){
|
|||||||
{prop: 'isChoose', label: '是否选择', width: "100px", sortable: true},
|
{prop: 'isChoose', label: '是否选择', width: "100px", sortable: true},
|
||||||
{prop: 'gist_list', label: '所选福利', width: "100px"},
|
{prop: 'gist_list', label: '所选福利', width: "100px"},
|
||||||
{prop: 'receiveAddress', label: '地址', width: "100px"},
|
{prop: 'receiveAddress', label: '地址', width: "100px"},
|
||||||
{prop: 'userSign', label: '签字', width: "100px"},
|
{prop: 'userSign', label: '签字', width: "100px", checked: 0},
|
||||||
|
{prop: 'isAudit', label: '是否确认'},
|
||||||
|
{prop: 'auditTime', label: '确认时间', checked: 0},
|
||||||
]),
|
]),
|
||||||
formRules: {},
|
formRules: {},
|
||||||
welfare,
|
welfare,
|
||||||
@@ -675,6 +671,35 @@ layout("/layouts/platform.html"){
|
|||||||
'courier-number-info': httpVueLoader('/components/welfare/CourierNumberInfo.vue?v=' + new Date().getTime())
|
'courier-number-info': httpVueLoader('/components/welfare/CourierNumberInfo.vue?v=' + new Date().getTime())
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
async doAudit(flag) {
|
||||||
|
// flag true,确认 false,取消
|
||||||
|
if ("${@shiro.hasRole('sysadmin')}" === "true" && !this.pageForm.welfareUnit) {
|
||||||
|
this.notifyWarning("请选择需要提交的分工会")
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if (this.pageForm.totalCount === 0) {
|
||||||
|
this.notifyWarning("当前分工会没有名单,暂不需要提交")
|
||||||
|
return
|
||||||
|
}
|
||||||
|
const confirm = await this.$confirm('您确定名单都已核实,准确无误?', '提示', {
|
||||||
|
confirmButtonText: '确定',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
type: 'warning'
|
||||||
|
})
|
||||||
|
if (confirm === "confirm") {
|
||||||
|
const resp = await $.post("/platform/welfare/list/mange/doAuditUser", {
|
||||||
|
projectId: this.pageForm.projectId,
|
||||||
|
unionId: this.pageForm.welfareUnit,
|
||||||
|
flag: flag
|
||||||
|
})
|
||||||
|
if (resp.code === 0) {
|
||||||
|
this.notifySuccess(resp.msg)
|
||||||
|
this.doSearch()
|
||||||
|
} else {
|
||||||
|
this.notifyError(resp.msg)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
doExcelByOptionId() {
|
doExcelByOptionId() {
|
||||||
if (!this.pageForm.optionId) {
|
if (!this.pageForm.optionId) {
|
||||||
this.$message.warning('请选择要导出的套餐')
|
this.$message.warning('请选择要导出的套餐')
|
||||||
@@ -1117,6 +1142,7 @@ layout("/layouts/platform.html"){
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
this.welfareOptions = resp.data
|
this.welfareOptions = resp.data
|
||||||
|
this.projectInfo = this.projectSelectOptions.find(v => v.value === this.pageForm.projectId)?.v
|
||||||
},
|
},
|
||||||
async changeWelfareUnit() {
|
async changeWelfareUnit() {
|
||||||
this.$set(this.pageForm, 'unit', '')
|
this.$set(this.pageForm, 'unit', '')
|
||||||
|
|||||||
@@ -212,6 +212,10 @@ layout("/layouts/platform.html"){
|
|||||||
v-for="column in tableColumns"
|
v-for="column in tableColumns"
|
||||||
>
|
>
|
||||||
<template scope="{row}" v-if="column.prop=='welfareUnitName'">{{row.welfareUnitName}}</template>
|
<template scope="{row}" v-if="column.prop=='welfareUnitName'">{{row.welfareUnitName}}</template>
|
||||||
|
<template scope="{row}" v-else-if="column.prop=='isAudit'">
|
||||||
|
<span v-if="row.isAudit"><el-tag>已提交</el-tag></span>
|
||||||
|
<span v-else><el-tag type="danger">未提交</el-tag></span>
|
||||||
|
</template>
|
||||||
<template scope="{row}" v-else-if="column.prop=='unselectedTeacherSum'">
|
<template scope="{row}" v-else-if="column.prop=='unselectedTeacherSum'">
|
||||||
<el-link @click="openUnclaimed(row.welfareUnitCode)" type="primary">{{row.unselectedTeacherSum}}</el-link>
|
<el-link @click="openUnclaimed(row.welfareUnitCode)" type="primary">{{row.unselectedTeacherSum}}</el-link>
|
||||||
</template>
|
</template>
|
||||||
@@ -589,6 +593,7 @@ layout("/layouts/platform.html"){
|
|||||||
label: welfare.welfareUnitModeName
|
label: welfare.welfareUnitModeName
|
||||||
}
|
}
|
||||||
].concat(resp.data.tableColumn)
|
].concat(resp.data.tableColumn)
|
||||||
|
this.tableColumns.push({prop: "isAudit", label: "是否核对"})
|
||||||
this.tableData = resp.data.tableList
|
this.tableData = resp.data.tableList
|
||||||
}
|
}
|
||||||
loading.close()
|
loading.close()
|
||||||
|
|||||||
@@ -56,12 +56,12 @@ layout("/layouts/platform.html"){
|
|||||||
<div class="search-item-label">年  度:</div>
|
<div class="search-item-label">年  度:</div>
|
||||||
<div class="search-item-option">
|
<div class="search-item-option">
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
@change="doSearch"
|
@change="doSearch"
|
||||||
placeholder="请选择"
|
placeholder="请选择"
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
type="year"
|
type="year"
|
||||||
v-model="pageForm.year"
|
v-model="pageForm.year"
|
||||||
value-format="yyyy"
|
value-format="yyyy"
|
||||||
></el-date-picker>
|
></el-date-picker>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -77,34 +77,34 @@ layout("/layouts/platform.html"){
|
|||||||
</table-tool>
|
</table-tool>
|
||||||
|
|
||||||
<el-table
|
<el-table
|
||||||
:data="tableData"
|
:data="tableData"
|
||||||
:size="tableSize"
|
:size="tableSize"
|
||||||
@sort-change="pageOrder"
|
@sort-change="pageOrder"
|
||||||
ref="table"
|
ref="table"
|
||||||
row-key="id"
|
row-key="id"
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
v-loading="tableLoading"
|
v-loading="tableLoading"
|
||||||
>
|
>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
:index="indexMethod"
|
:index="indexMethod"
|
||||||
align="center"
|
align="center"
|
||||||
header-align="center"
|
header-align="center"
|
||||||
label="序号"
|
label="序号"
|
||||||
type="index"
|
type="index"
|
||||||
width="80px"
|
width="80px"
|
||||||
></el-table-column>
|
></el-table-column>
|
||||||
|
|
||||||
<el-table-column
|
<el-table-column
|
||||||
:key="column.prop"
|
:key="column.prop"
|
||||||
:label="column.label"
|
:label="column.label"
|
||||||
:prop="column.prop"
|
:prop="column.prop"
|
||||||
:sortable="column.sortable"
|
:sortable="column.sortable"
|
||||||
:width="column.width"
|
:width="column.width"
|
||||||
align="center"
|
align="center"
|
||||||
header-align="center"
|
header-align="center"
|
||||||
min-width="100px"
|
min-width="100px"
|
||||||
show-overflow-tooltip
|
show-overflow-tooltip
|
||||||
v-for="column in tableColumns"
|
v-for="column in tableColumns"
|
||||||
>
|
>
|
||||||
<template scope="{row}" v-if="column.prop=='choiceTime'">
|
<template scope="{row}" v-if="column.prop=='choiceTime'">
|
||||||
<i class="el-icon-time"></i>
|
<i class="el-icon-time"></i>
|
||||||
@@ -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,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="选择时间">{{projectInfo.choiceTimeStart}}至{{projectInfo.choiceTimeEnd}}</el-form-item>
|
<el-form-item label="选择时间">
|
||||||
|
{{projectInfo.choiceTimeStart}}至{{projectInfo.choiceTimeEnd}}
|
||||||
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
@@ -199,16 +204,17 @@ 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>
|
||||||
|
|
||||||
<div style="display: grid; grid-template-rows: auto 1fr auto; height: 200px">
|
<div style="display: grid; grid-template-rows: auto 1fr auto; height: 200px">
|
||||||
<div style="display: flex">
|
<div style="display: flex">
|
||||||
<el-image
|
<el-image
|
||||||
style="width: 150px; height: 150px"
|
style="width: 150px; height: 150px"
|
||||||
:src="CREATE_PREVIEW_URL(option.imgUrl)"
|
:src="CREATE_PREVIEW_URL(option.imgUrl)"
|
||||||
fit="contain"
|
fit="contain"
|
||||||
></el-image>
|
></el-image>
|
||||||
|
|
||||||
<div style="width: calc(100% - 150px); padding-left: 20px; position: relative">
|
<div style="width: calc(100% - 150px); padding-left: 20px; position: relative">
|
||||||
@@ -216,8 +222,8 @@ layout("/layouts/platform.html"){
|
|||||||
<span class="desc_label"></span>
|
<span class="desc_label"></span>
|
||||||
<el-tooltip placement="top" :content="option.supplier">
|
<el-tooltip placement="top" :content="option.supplier">
|
||||||
<span
|
<span
|
||||||
class="desc_value"
|
class="desc_value"
|
||||||
style="width: calc(100% - 80px); text-overflow: ellipsis; overflow: hidden"
|
style="width: calc(100% - 80px); text-overflow: ellipsis; overflow: hidden"
|
||||||
>
|
>
|
||||||
{{ option.supplier }}
|
{{ option.supplier }}
|
||||||
</span>
|
</span>
|
||||||
@@ -229,30 +235,30 @@ layout("/layouts/platform.html"){
|
|||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<el-input-number
|
<el-input-number
|
||||||
:disabled="isView"
|
:disabled="isView"
|
||||||
:max="option.maxNum"
|
:max="option.maxNum"
|
||||||
:min="0"
|
:min="0"
|
||||||
@keydown.native="onKeydown"
|
@keydown.native="onKeydown"
|
||||||
@change="numChange(option.selectNum, option, oidx)"
|
@change="numChange(option.selectNum, option, oidx)"
|
||||||
style="width: 150px; position: absolute; right: 0; bottom: 0"
|
style="width: 150px; position: absolute; right: 0; bottom: 0"
|
||||||
v-model="option.selectNum"
|
v-model="option.selectNum"
|
||||||
></el-input-number>
|
></el-input-number>
|
||||||
</div>
|
</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%"
|
||||||
clearable
|
clearable
|
||||||
:disabled="option.selectNum == 0"
|
:disabled="option.selectNum == 0"
|
||||||
placeholder="请选择取货门店"
|
placeholder="请选择取货门店"
|
||||||
v-model="option.receiveAddress"
|
v-model="option.receiveAddress"
|
||||||
>
|
>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in option.receiveAddressList"
|
v-for="item in option.receiveAddressList"
|
||||||
:key="item.address"
|
:key="item.address"
|
||||||
:label="item.address"
|
:label="item.address"
|
||||||
:value="item.address"
|
:value="item.address"
|
||||||
></el-option>
|
></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</div>
|
</div>
|
||||||
@@ -270,17 +276,17 @@ layout("/layouts/platform.html"){
|
|||||||
<div style="display: flex; column-gap: 10px">
|
<div style="display: flex; column-gap: 10px">
|
||||||
<div style="flex: 1">
|
<div style="flex: 1">
|
||||||
<el-select
|
<el-select
|
||||||
@change="addressChange"
|
@change="addressChange"
|
||||||
filterable
|
filterable
|
||||||
placeholder="请选择收货地址"
|
placeholder="请选择收货地址"
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
v-model="formData.addressId"
|
v-model="formData.addressId"
|
||||||
>
|
>
|
||||||
<el-option
|
<el-option
|
||||||
:key="item.id"
|
:key="item.id"
|
||||||
:label="item.name+' '+item.defaultName"
|
:label="item.name+' '+item.defaultName"
|
||||||
:value="item.id"
|
:value="item.id"
|
||||||
v-for="item in addressOptions"
|
v-for="item in addressOptions"
|
||||||
></el-option>
|
></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</div>
|
</div>
|
||||||
@@ -296,17 +302,17 @@ layout("/layouts/platform.html"){
|
|||||||
</el-col>
|
</el-col>
|
||||||
<el-col span="24">
|
<el-col span="24">
|
||||||
<el-form-item
|
<el-form-item
|
||||||
:rules="{required:true,message: '请确认收货地址', trigger: 'blur'}"
|
:rules="{required:true,message: '请确认收货地址', trigger: 'blur'}"
|
||||||
label="请确认收货地址"
|
label="请确认收货地址"
|
||||||
prop="receiveAddress"
|
prop="receiveAddress"
|
||||||
>
|
>
|
||||||
<el-input
|
<el-input
|
||||||
:rows="4"
|
:rows="4"
|
||||||
disabled
|
disabled
|
||||||
maxlength="100"
|
maxlength="100"
|
||||||
placeholder="选择收货地址联动"
|
placeholder="选择收货地址联动"
|
||||||
type="textarea"
|
type="textarea"
|
||||||
v-model="formData.receiveAddress"
|
v-model="formData.receiveAddress"
|
||||||
></el-input>
|
></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
@@ -314,20 +320,20 @@ layout("/layouts/platform.html"){
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<el-form-item
|
<el-form-item
|
||||||
:rules="{required:true,message: '请签字', trigger: 'blur'}"
|
:rules="{required:true,message: '请签字', trigger: 'blur'}"
|
||||||
label="签字"
|
label="签字"
|
||||||
prop="sign"
|
prop="sign"
|
||||||
v-if="projectInfo.signMode===2"
|
v-if="projectInfo.signMode===2"
|
||||||
>
|
>
|
||||||
<template v-if="isChoice===0||!isView">
|
<template v-if="isChoice===0||!isView">
|
||||||
<sign :is_value_base64="false" :qz.sync="formData.sign" prefix="welfare" ref="sign"></sign>
|
<sign :is_value_base64="false" :qz.sync="formData.sign" prefix="welfare" ref="sign"></sign>
|
||||||
</template>
|
</template>
|
||||||
<template v-else>
|
<template v-else>
|
||||||
<el-image
|
<el-image
|
||||||
:src="'/signature/getSignData?path=' +formData.imageUrl"
|
:src="'/signature/getSignData?path=' +formData.imageUrl"
|
||||||
fit="contain"
|
fit="contain"
|
||||||
style="height: 100px; width: 100%"
|
style="height: 100px; width: 100%"
|
||||||
v-if="formData.imageUrl"
|
v-if="formData.imageUrl"
|
||||||
></el-image>
|
></el-image>
|
||||||
<span v-else>暂无</span>
|
<span v-else>暂无</span>
|
||||||
</template>
|
</template>
|
||||||
@@ -349,30 +355,31 @@ 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">
|
||||||
<el-cascader
|
<el-cascader
|
||||||
:options="dzOptions"
|
:options="dzOptions"
|
||||||
:props="{ expandTrigger: 'hover' }"
|
:props="{ expandTrigger: 'hover' }"
|
||||||
@change="handleChange"
|
@change="handleChange"
|
||||||
clearable
|
clearable
|
||||||
placeholder="请选择地址信息"
|
placeholder="请选择地址信息"
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
v-model="formData.addressList"
|
v-model="formData.addressList"
|
||||||
></el-cascader>
|
></el-cascader>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="24">
|
<el-col :span="24">
|
||||||
<el-form-item label="详细地址" prop="addressDetail">
|
<el-form-item label="详细地址" prop="addressDetail">
|
||||||
<el-input
|
<el-input
|
||||||
maxlength="100"
|
maxlength="100"
|
||||||
placeholder="请输入详细地址信息,如道路、门牌号、小区、楼栋号、单元等信息"
|
placeholder="请输入详细地址信息,如道路、门牌号、小区、楼栋号、单元等信息"
|
||||||
rows="3"
|
rows="3"
|
||||||
show-word-limit
|
show-word-limit
|
||||||
type="textarea"
|
type="textarea"
|
||||||
v-model="formData.addressDetail"
|
v-model="formData.addressDetail"
|
||||||
></el-input>
|
></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
@@ -383,20 +390,21 @@ 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>
|
||||||
|
|
||||||
<el-col :span="24">
|
<el-col :span="24">
|
||||||
<el-form-item label="是否默认" prop="isDefault">
|
<el-form-item label="是否默认" prop="isDefault">
|
||||||
<el-switch
|
<el-switch
|
||||||
v-model="formData.isDefault"
|
v-model="formData.isDefault"
|
||||||
active-color="#13ce66"
|
active-color="#13ce66"
|
||||||
inactive-color="#ff4949"
|
inactive-color="#ff4949"
|
||||||
active-value="1"
|
active-value="1"
|
||||||
inactive-value="0"
|
inactive-value="0"
|
||||||
active-text="是"
|
active-text="是"
|
||||||
inactive-text="否"
|
inactive-text="否"
|
||||||
></el-switch>
|
></el-switch>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
@@ -432,12 +440,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,
|
||||||
@@ -445,12 +453,12 @@ 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: "请输入正确的手机号"}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -477,30 +485,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}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -560,7 +568,7 @@ layout("/layouts/platform.html"){
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
handlePlusButtonClick(value, option, optionIndex) {
|
handlePlusButtonClick(value, option, optionIndex) {
|
||||||
const { isCheckBox, multiSelectNum, singleOptionSupportMultipleSelection } = this.projectInfo
|
const {isCheckBox, multiSelectNum, singleOptionSupportMultipleSelection} = this.projectInfo
|
||||||
if (isCheckBox === "checkBox") {
|
if (isCheckBox === "checkBox") {
|
||||||
//判断是否支持单个多选
|
//判断是否支持单个多选
|
||||||
if (!singleOptionSupportMultipleSelection && value > 1) {
|
if (!singleOptionSupportMultipleSelection && value > 1) {
|
||||||
@@ -580,7 +588,7 @@ layout("/layouts/platform.html"){
|
|||||||
},
|
},
|
||||||
|
|
||||||
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
|
||||||
@@ -611,7 +619,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) {
|
||||||
//用户没有选择完
|
//用户没有选择完
|
||||||
@@ -627,10 +635,15 @@ layout("/layouts/platform.html"){
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 判断门店是否选择
|
// 判断门店是否选择
|
||||||
|
console.log(this.projectInfo.welfareProjectSubjects[0])
|
||||||
const chooseOptions = this.projectInfo.welfareProjectSubjects[0].options
|
const chooseOptions = this.projectInfo.welfareProjectSubjects[0].options
|
||||||
.filter((v) => v.selectNum > 0)
|
.filter((v) => v.selectNum > 0 && v.shoppingId)
|
||||||
.map((item) => {
|
.map((item) => {
|
||||||
return { optionName: item.optionName, selectNum: item.selectNum, receiveAddress: item.receiveAddress }
|
return {
|
||||||
|
optionName: item.optionName,
|
||||||
|
selectNum: item.selectNum,
|
||||||
|
receiveAddress: item.receiveAddress
|
||||||
|
}
|
||||||
})
|
})
|
||||||
let isReceiveAddress = true
|
let isReceiveAddress = true
|
||||||
for (const item of chooseOptions) {
|
for (const item of chooseOptions) {
|
||||||
@@ -670,7 +683,7 @@ layout("/layouts/platform.html"){
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
console.log(formData)
|
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
|
||||||
})
|
})
|
||||||
@@ -719,7 +732,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()
|
||||||
},
|
},
|
||||||
@@ -738,7 +751,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() {
|
||||||
@@ -759,9 +772,9 @@ 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
|
||||||
})
|
})
|
||||||
|
|
||||||
console.log(this.projectInfo.welfareProjectSubjects[0])
|
console.log(this.projectInfo.welfareProjectSubjects[0])
|
||||||
|
|||||||
Reference in New Issue
Block a user